From 403fe083ed2156b2cf0b0448e641a30f5f4180a5 Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 30 Nov 2024 13:49:23 +0900 Subject: [PATCH] Debugger: Allow screensaver/sleep to turn on when paused while debug tools are opened --- Core/Debugger/Debugger.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Core/Debugger/Debugger.cpp b/Core/Debugger/Debugger.cpp index eeed6d21..35ae51af 100644 --- a/Core/Debugger/Debugger.cpp +++ b/Core/Debugger/Debugger.cpp @@ -49,11 +49,12 @@ #include "Shared/BaseState.h" #include "Shared/Emulator.h" #include "Shared/Interfaces/IConsole.h" +#include "Shared/MemoryOperationType.h" +#include "Shared/EventType.h" #include "Utilities/HexUtilities.h" #include "Utilities/FolderUtilities.h" #include "Utilities/Patches/IpsPatcher.h" -#include "Shared/MemoryOperationType.h" -#include "Shared/EventType.h" +#include "Utilities/PlatformUtilities.h" uint64_t ITraceLogger::NextRowId = 0; @@ -495,6 +496,7 @@ void Debugger::SleepUntilResume(CpuType sourceCpu, BreakSource source, MemoryOpe _emu->GetNotificationManager()->SendNotification(ConsoleNotificationType::CodeBreak, &evt); ProcessEvent(EventType::CodeBreak, sourceCpu); notificationSent = true; + PlatformUtilities::EnableScreensaver(); } while((_waitForBreakResume && !_suspendRequestCount) || _breakRequestCount) { @@ -502,6 +504,7 @@ void Debugger::SleepUntilResume(CpuType sourceCpu, BreakSource source, MemoryOpe } if(notificationSent) { + PlatformUtilities::DisableScreensaver(); _emu->GetNotificationManager()->SendNotification(ConsoleNotificationType::DebuggerResumed); }