diff options
author | Kingcom <sorgts@googlemail.com> | 2015-01-07 12:14:23 +0100 |
---|---|---|
committer | Kingcom <sorgts@googlemail.com> | 2015-01-11 21:22:51 +0100 |
commit | 2bbc12e6c3dbeb2b8cc73753c1fddca94bdde50f (patch) | |
tree | 110079649f6649195c93b53815aceaab14b183fc /src/citra_qt/bootmanager.cpp | |
parent | 0bf5a0bfc47cebb64dc2740c475a631d6fb13a2f (diff) |
citra-qt: Replace OnCpuStepped signal by new signals DebugModeEntered and DebugModeLeft
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 3e24da596a..196380105c 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -40,18 +40,35 @@ void EmuThread::SetFilename(std::string filename) void EmuThread::run() { stop_run = false; + + // holds whether the cpu was running during the last iteration, + // so that the DebugModeLeft signal can be emitted before the + // next execution step + bool was_active = false; while (!stop_run) { if (cpu_running) { + if (!was_active) + emit DebugModeLeft(); + Core::RunLoop(); + + was_active = cpu_running || exec_cpu_step; + if (!was_active) + emit DebugModeEntered(); } else if (exec_cpu_step) { + if (!was_active) + emit DebugModeLeft(); + exec_cpu_step = false; Core::SingleStep(); - emit CPUStepped(); + emit DebugModeEntered(); yieldCurrentThread(); + + was_active = false; } } render_window->moveContext(); |