mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 14:25:45 -04:00
Qt: Fix double-clicking psexes/psfs in game list
This commit is contained in:
@ -706,6 +706,20 @@ bool CommonHostInterface::SaveState(bool global, s32 slot)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommonHostInterface::CanResumeSystemFromFile(const char* filename)
|
||||
{
|
||||
if (GetBoolSettingValue("Main", "SaveStateOnExit", true) && !IsCheevosChallengeModeActive())
|
||||
{
|
||||
const GameListEntry* entry = m_game_list->GetEntryForPath(filename);
|
||||
if (entry)
|
||||
return !entry->code.empty();
|
||||
else
|
||||
return !System::GetGameCodeForPath(filename, true).empty();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool CommonHostInterface::ResumeSystemFromState(const char* filename, bool boot_on_failure)
|
||||
{
|
||||
SystemBootParameters boot_params;
|
||||
|
@ -180,6 +180,9 @@ public:
|
||||
/// Saves the current emulation state to a file. Specifying a slot of -1 saves the "resume" save state.
|
||||
bool SaveState(bool global, s32 slot);
|
||||
|
||||
/// Returns true if the specified file/disc image is resumable.
|
||||
bool CanResumeSystemFromFile(const char* filename);
|
||||
|
||||
/// Loads the resume save state for the given game. Optionally boots the game anyway if loading fails.
|
||||
bool ResumeSystemFromState(const char* filename, bool boot_on_failure);
|
||||
|
||||
|
Reference in New Issue
Block a user