summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-01-17 18:34:58 -0500
committerGravatar Lioncash2018-01-17 18:35:02 -0500
commite50188374f94b4ea4039ca628313b0e7c40de4d6 (patch)
tree10c13314223270c67e1336fc73d96c6254edc484 /src
parentMerge pull request #73 from N00byKing/3093 (diff)
downloadyuzu-e50188374f94b4ea4039ca628313b0e7c40de4d6.tar.gz
yuzu-e50188374f94b4ea4039ca628313b0e7c40de4d6.tar.xz
yuzu-e50188374f94b4ea4039ca628313b0e7c40de4d6.zip
bootmanager: Minor tidiness/correctness changes
Moved over from #3266 in citra.
Diffstat (limited to 'src')
-rw-r--r--src/yuzu/bootmanager.cpp3
-rw-r--r--src/yuzu/bootmanager.h10
2 files changed, 6 insertions, 7 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp
index 61d678c9b..b9dc4943a 100644
--- a/src/yuzu/bootmanager.cpp
+++ b/src/yuzu/bootmanager.cpp
@@ -15,8 +15,7 @@
15#include "input_common/motion_emu.h" 15#include "input_common/motion_emu.h"
16#include "yuzu/bootmanager.h" 16#include "yuzu/bootmanager.h"
17 17
18EmuThread::EmuThread(GRenderWindow* render_window) 18EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {}
19 : exec_step(false), running(false), stop_run(false), render_window(render_window) {}
20 19
21void EmuThread::run() { 20void EmuThread::run() {
22 render_window->MakeCurrent(); 21 render_window->MakeCurrent();
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 6974edcbb..130bc613b 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -58,7 +58,7 @@ public:
58 * @return True if the emulation thread is running, otherwise false 58 * @return True if the emulation thread is running, otherwise false
59 * @note This function is thread-safe 59 * @note This function is thread-safe
60 */ 60 */
61 bool IsRunning() { 61 bool IsRunning() const {
62 return running; 62 return running;
63 } 63 }
64 64
@@ -68,12 +68,12 @@ public:
68 void RequestStop() { 68 void RequestStop() {
69 stop_run = true; 69 stop_run = true;
70 SetRunning(false); 70 SetRunning(false);
71 }; 71 }
72 72
73private: 73private:
74 bool exec_step; 74 bool exec_step = false;
75 bool running; 75 bool running = false;
76 std::atomic<bool> stop_run; 76 std::atomic<bool> stop_run{false};
77 std::mutex running_mutex; 77 std::mutex running_mutex;
78 std::condition_variable running_cv; 78 std::condition_variable running_cv;
79 79