diff options
author | Sacha <xsacha@gmail.com> | 2014-08-24 19:42:52 +0200 |
---|---|---|
committer | Sacha <xsacha@gmail.com> | 2014-08-24 19:42:52 +0200 |
commit | 1b1205cf739d0913dd474779245fd59dccbf2fcf (patch) | |
tree | 64505f9f1dbe1d10b8b15661db8f2dc191d8ca98 /src/citra_qt/bootmanager.cpp | |
parent | Fix EmuThread loop by ensuring it exits properly. (diff) | |
download | yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar.gz yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar.bz2 yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar.lz yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar.xz yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.tar.zst yuzu-1b1205cf739d0913dd474779245fd59dccbf2fcf.zip |
Diffstat (limited to '')
-rw-r--r-- | src/citra_qt/bootmanager.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index 2407f3a3a..573060d30 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -33,7 +33,7 @@ void EmuThread::SetFilename(std::string filename) void EmuThread::run() { stop_run = false; - while (true) + while (!stop_run) { for (int tight_loop = 0; tight_loop < 10000; ++tight_loop) { @@ -49,9 +49,6 @@ void EmuThread::run() } } } - QMutexLocker lock(&mutex); - if (stop_run) - break; } render_window->moveContext(); @@ -65,11 +62,7 @@ void EmuThread::Stop() INFO_LOG(MASTER_LOG, "EmuThread::Stop called while emu thread wasn't running, returning..."); return; } - - { - QMutexLocker lock(&mutex); - stop_run = true; - } + stop_run = true; //core::g_state = core::SYS_DIE; @@ -94,7 +87,7 @@ void EmuThread::Stop() class GGLWidgetInternal : public QGLWidget { public: - GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(parent) + GGLWidgetInternal(QGLFormat fmt, GRenderWindow* parent) : QGLWidget(fmt, parent) { parent_ = parent; } |