Debugger: Lua - Fixed debug hud drawings remaining on screen after reset/power cycle/load state

This commit is contained in:
Sour 2018-07-30 21:05:13 -04:00
parent eddfe2301c
commit a978e1e08f
2 changed files with 4 additions and 0 deletions

View file

@ -580,6 +580,7 @@ void Console::ResetComponents(bool softReset)
} }
_soundMixer->StopAudio(true); _soundMixer->StopAudio(true);
_debugHud->ClearScreen();
_memoryManager->Reset(softReset); _memoryManager->Reset(softReset);
if(!_settings->CheckFlag(EmulationFlags::DisablePpuReset) || !softReset) { if(!_settings->CheckFlag(EmulationFlags::DisablePpuReset) || !softReset) {
@ -1001,6 +1002,7 @@ void Console::LoadState(istream &loadStream, uint32_t stateVersion)
debugger->ResetCounters(); debugger->ResetCounters();
} }
_debugHud->ClearScreen();
_notificationManager->SendNotification(ConsoleNotificationType::StateLoaded); _notificationManager->SendNotification(ConsoleNotificationType::StateLoaded);
} }
} }

View file

@ -28,6 +28,7 @@
#include "Breakpoint.h" #include "Breakpoint.h"
#include "CodeDataLogger.h" #include "CodeDataLogger.h"
#include "NotificationManager.h" #include "NotificationManager.h"
#include "DebugHud.h"
const int Debugger::BreakpointTypeCount; const int Debugger::BreakpointTypeCount;
string Debugger::_disassemblerOutput = ""; string Debugger::_disassemblerOutput = "";
@ -1247,6 +1248,7 @@ void Debugger::RemoveScript(int32_t scriptId)
if(script->GetScriptId() == scriptId) { if(script->GetScriptId() == scriptId) {
//Send a ScriptEnded event before unloading the script //Send a ScriptEnded event before unloading the script
script->ProcessEvent(EventType::ScriptEnded); script->ProcessEvent(EventType::ScriptEnded);
_console->GetDebugHud()->ClearScreen();
return true; return true;
} }
return false; return false;