mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Convert GetUserPath to return a std::string instead of a const char *. This simplifies its usage in most cases.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7265 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -181,10 +181,10 @@ void CompressAndDumpState(saveStruct* saveArg)
|
||||
// Moving to last overwritten save-state
|
||||
if (File::Exists(cur_filename.c_str()))
|
||||
{
|
||||
if (File::Exists((std::string(File::GetUserPath(D_STATESAVES_IDX)) + "lastState.sav").c_str()))
|
||||
File::Delete((std::string(File::GetUserPath(D_STATESAVES_IDX)) + "lastState.sav").c_str());
|
||||
if (File::Exists((File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav").c_str()))
|
||||
File::Delete((File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav").c_str());
|
||||
|
||||
if (!File::Rename(cur_filename.c_str(), (std::string(File::GetUserPath(D_STATESAVES_IDX)) + "lastState.sav").c_str()))
|
||||
if (!File::Rename(cur_filename.c_str(), (File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav").c_str()))
|
||||
Core::DisplayMessage("Failed to move previous state to state undo backup", 1000);
|
||||
}
|
||||
|
||||
@ -515,7 +515,7 @@ void State_Shutdown()
|
||||
|
||||
static std::string MakeStateFilename(int state_number)
|
||||
{
|
||||
return StringFromFormat("%s%s.s%02i", File::GetUserPath(D_STATESAVES_IDX), SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), state_number);
|
||||
return StringFromFormat("%s%s.s%02i", File::GetUserPath(D_STATESAVES_IDX).c_str(), SConfig::GetInstance().m_LocalCoreStartupParameter.GetUniqueID().c_str(), state_number);
|
||||
}
|
||||
|
||||
void State_SaveAs(const std::string &filename)
|
||||
@ -614,7 +614,7 @@ void State_UndoLoadState()
|
||||
// Load the state that the last save state overwritten on
|
||||
void State_UndoSaveState()
|
||||
{
|
||||
State_LoadAs((std::string(File::GetUserPath(D_STATESAVES_IDX)) + "lastState.sav").c_str());
|
||||
State_LoadAs((File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav").c_str());
|
||||
}
|
||||
|
||||
size_t State_GetSize()
|
||||
|
Reference in New Issue
Block a user