Debugger: Prevent autosave from resuming execution

This commit is contained in:
Souryo 2016-11-26 18:04:09 -05:00
parent 50103ff94a
commit 5db212c98c
3 changed files with 10 additions and 1 deletions

View File

@ -14,7 +14,9 @@ AutoSaveManager::AutoSaveManager()
uint32_t autoSaveDelay = EmulationSettings::GetAutoSaveDelay(showMessage) * 60 * 1000;
if(autoSaveDelay > 0) {
if(_timer.GetElapsedMS() > autoSaveDelay) {
SaveStateManager::SaveState(_autoSaveSlot, showMessage);
if(!Console::IsDebuggerAttached()) {
SaveStateManager::SaveState(_autoSaveSlot, showMessage);
}
_timer.Reset();
}
} else {

View File

@ -500,4 +500,9 @@ uint32_t Console::GetLagCounter()
void Console::ResetLagCounter()
{
Instance->_lagCounter = 0;
}
bool Console::IsDebuggerAttached()
{
return (bool)Instance->_debugger;
}

View File

@ -83,6 +83,8 @@ class Console
static bool IsRunning();
static bool IsDebuggerAttached();
static shared_ptr<Console> GetInstance();
static void Release();
};