diff --git a/Core/Core.cpp b/Core/Core.cpp index 23f3e7eedd..56e113b75c 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -39,6 +39,7 @@ #include "Core/SaveState.h" #include "Core/System.h" #include "Core/Debugger/Breakpoints.h" +#include "Core/HW/Display.h" #include "Core/MIPS/MIPS.h" #include "GPU/Debugger/Stepping.h" @@ -279,8 +280,11 @@ void Core_SingleStep() { static inline bool Core_WaitStepping() { std::unique_lock guard(m_hStepMutex); // We only wait 16ms so that we can still draw UI or react to events. + double sleepStart = time_now_d(); if (!singleStepPending && coreState == CORE_STEPPING) m_StepCond.wait_for(guard, std::chrono::milliseconds(16)); + double sleepEnd = time_now_d(); + DisplayNotifySleep(sleepEnd - sleepStart); bool result = singleStepPending; singleStepPending = false; diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index a56b48171f..8565c2fc7c 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -27,6 +27,7 @@ #include "Core/HLE/sceKernelInterrupt.h" #include "Core/HLE/sceKernelThread.h" #include "Core/HLE/sceGe.h" +#include "Core/HW/Display.h" #include "Core/MemMapHelpers.h" #include "Core/Util/PPGeDraw.h" #include "GPU/Common/DrawEngineCommon.h" @@ -1032,6 +1033,7 @@ bool GPUCommon::InterpretList(DisplayList &list) { double total = time_now_d() - start - timeSpentStepping_; _dbg_assert_msg_(total >= 0.0, "Time spent DL processing became negative"); hleSetSteppingTime(timeSpentStepping_); + DisplayNotifySleep(timeSpentStepping_); timeSpentStepping_ = 0.0; gpuStats.msProcessingDisplayLists += total; }