mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-26 23:55:40 +00:00
HostInterface: Make helper methods const
This commit is contained in:
parent
153eded978
commit
f0578bb932
|
@ -543,7 +543,7 @@ std::string HostInterface::GetGameListDatabaseFileName() const
|
|||
return GetUserDirectoryRelativePath("cache/redump.dat");
|
||||
}
|
||||
|
||||
std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 slot)
|
||||
std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 slot) const
|
||||
{
|
||||
if (slot < 0)
|
||||
return GetUserDirectoryRelativePath("savestates/%s_resume.sav", game_code);
|
||||
|
@ -551,7 +551,7 @@ std::string HostInterface::GetGameSaveStateFileName(const char* game_code, s32 s
|
|||
return GetUserDirectoryRelativePath("savestates/%s_%d.sav", game_code, slot);
|
||||
}
|
||||
|
||||
std::string HostInterface::GetGlobalSaveStateFileName(s32 slot)
|
||||
std::string HostInterface::GetGlobalSaveStateFileName(s32 slot) const
|
||||
{
|
||||
if (slot < 0)
|
||||
return GetUserDirectoryRelativePath("savestates/resume.sav");
|
||||
|
@ -559,17 +559,17 @@ std::string HostInterface::GetGlobalSaveStateFileName(s32 slot)
|
|||
return GetUserDirectoryRelativePath("savestates/savestate_%d.sav", slot);
|
||||
}
|
||||
|
||||
std::string HostInterface::GetSharedMemoryCardPath(u32 slot)
|
||||
std::string HostInterface::GetSharedMemoryCardPath(u32 slot) const
|
||||
{
|
||||
return GetUserDirectoryRelativePath("memcards/shared_card_%d.mcd", slot + 1);
|
||||
}
|
||||
|
||||
std::string HostInterface::GetGameMemoryCardPath(const char* game_code, u32 slot)
|
||||
std::string HostInterface::GetGameMemoryCardPath(const char* game_code, u32 slot) const
|
||||
{
|
||||
return GetUserDirectoryRelativePath("memcards/game_card_%s_%d.mcd", game_code, slot + 1);
|
||||
}
|
||||
|
||||
std::vector<HostInterface::SaveStateInfo> HostInterface::GetAvailableSaveStates(const char* game_code)
|
||||
std::vector<HostInterface::SaveStateInfo> HostInterface::GetAvailableSaveStates(const char* game_code) const
|
||||
{
|
||||
std::vector<SaveStateInfo> si;
|
||||
std::string path;
|
||||
|
|
|
@ -108,19 +108,19 @@ protected:
|
|||
std::string GetGameListDatabaseFileName() const;
|
||||
|
||||
/// Returns the path to a save state file. Specifying an index of -1 is the "resume" save state.
|
||||
std::string GetGameSaveStateFileName(const char* game_code, s32 slot);
|
||||
std::string GetGameSaveStateFileName(const char* game_code, s32 slot) const;
|
||||
|
||||
/// Returns the path to a save state file. Specifying an index of -1 is the "resume" save state.
|
||||
std::string GetGlobalSaveStateFileName(s32 slot);
|
||||
std::string GetGlobalSaveStateFileName(s32 slot) const;
|
||||
|
||||
/// Returns the default path to a memory card.
|
||||
std::string GetSharedMemoryCardPath(u32 slot);
|
||||
std::string GetSharedMemoryCardPath(u32 slot) const;
|
||||
|
||||
/// Returns the default path to a memory card for a specific game.
|
||||
std::string GetGameMemoryCardPath(const char* game_code, u32 slot);
|
||||
std::string GetGameMemoryCardPath(const char* game_code, u32 slot) const;
|
||||
|
||||
/// Returns a list of save states for the specified game code.
|
||||
std::vector<SaveStateInfo> GetAvailableSaveStates(const char* game_code);
|
||||
std::vector<SaveStateInfo> GetAvailableSaveStates(const char* game_code) const;
|
||||
|
||||
/// Loads the current emulation state from file. Specifying a slot of -1 loads the "resume" game state.
|
||||
bool LoadState(bool global, u32 slot);
|
||||
|
|
Loading…
Reference in a new issue