diff options
| author | 2018-01-17 18:34:58 -0500 | |
|---|---|---|
| committer | 2018-01-17 18:35:02 -0500 | |
| commit | e50188374f94b4ea4039ca628313b0e7c40de4d6 (patch) | |
| tree | 10c13314223270c67e1336fc73d96c6254edc484 /src | |
| parent | Merge pull request #73 from N00byKing/3093 (diff) | |
| download | yuzu-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.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.h | 10 |
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 | ||
| 18 | EmuThread::EmuThread(GRenderWindow* render_window) | 18 | EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {} |
| 19 | : exec_step(false), running(false), stop_run(false), render_window(render_window) {} | ||
| 20 | 19 | ||
| 21 | void EmuThread::run() { | 20 | void 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 | ||
| 73 | private: | 73 | private: |
| 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 | ||