summaryrefslogtreecommitdiffstats
path: root/src/citra_qt/bootmanager.cpp
diff options
context:
space:
mode:
authorTony Wasserka <neobrainx@gmail.com>2015-01-11 21:28:18 +0100
committerTony Wasserka <neobrainx@gmail.com>2015-01-11 21:28:18 +0100
commitf1080de47d22bec2b55947718cc7f489bfd0c6ba (patch)
tree35383951c562a1a73b1f8b6a78241cd3259ab727 /src/citra_qt/bootmanager.cpp
parentMerge pull request #465 from chinhodado/appveyor (diff)
parentcitra-qt: Replace OnCpuStepped signal by new signals DebugModeEntered and DebugModeLeft (diff)
downloadyuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar.gz
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar.bz2
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar.lz
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar.xz
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.tar.zst
yuzu-f1080de47d22bec2b55947718cc7f489bfd0c6ba.zip
Diffstat (limited to 'src/citra_qt/bootmanager.cpp')
-rw-r--r--src/citra_qt/bootmanager.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp
index 3e24da596..196380105 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();