mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-01 02:29:59 -06:00
Kill off some usages of c_str.
Also changes some function params, but this is ok. Some simplifications were also able to be made (ie. killing off strcmps with ==, etc).
This commit is contained in:
@ -317,15 +317,15 @@ void InsertDiscCallback(u64 userdata, int cyclesLate)
|
||||
delete _FileName;
|
||||
}
|
||||
|
||||
void ChangeDisc(const char* _newFileName)
|
||||
void ChangeDisc(const std::string& newFileName)
|
||||
{
|
||||
std::string* _FileName = new std::string(_newFileName);
|
||||
std::string* _FileName = new std::string(newFileName);
|
||||
CoreTiming::ScheduleEvent_Threadsafe(0, ejectDisc);
|
||||
CoreTiming::ScheduleEvent_Threadsafe(500000000, insertDisc, (u64)_FileName);
|
||||
if (Movie::IsRecordingInput())
|
||||
{
|
||||
Movie::g_bDiscChange = true;
|
||||
std::string fileName = _newFileName;
|
||||
std::string fileName = newFileName;
|
||||
auto sizeofpath = fileName.find_last_of("/\\") + 1;
|
||||
if (fileName.substr(sizeofpath).length() > 40)
|
||||
{
|
||||
|
Reference in New Issue
Block a user