yuzu-emu
/
yuzu-mainline
Archived
1
0
Fork 0

bootmanager: Minor tidiness/correctness changes

Moved over from #3266 in citra.
This commit is contained in:
Lioncash 2018-01-17 18:34:58 -05:00
parent ee08c39b72
commit e50188374f
2 changed files with 6 additions and 7 deletions

View File

@ -15,8 +15,7 @@
#include "input_common/motion_emu.h" #include "input_common/motion_emu.h"
#include "yuzu/bootmanager.h" #include "yuzu/bootmanager.h"
EmuThread::EmuThread(GRenderWindow* render_window) EmuThread::EmuThread(GRenderWindow* render_window) : render_window(render_window) {}
: exec_step(false), running(false), stop_run(false), render_window(render_window) {}
void EmuThread::run() { void EmuThread::run() {
render_window->MakeCurrent(); render_window->MakeCurrent();

View File

@ -58,7 +58,7 @@ public:
* @return True if the emulation thread is running, otherwise false * @return True if the emulation thread is running, otherwise false
* @note This function is thread-safe * @note This function is thread-safe
*/ */
bool IsRunning() { bool IsRunning() const {
return running; return running;
} }
@ -68,12 +68,12 @@ public:
void RequestStop() { void RequestStop() {
stop_run = true; stop_run = true;
SetRunning(false); SetRunning(false);
}; }
private: private:
bool exec_step; bool exec_step = false;
bool running; bool running = false;
std::atomic<bool> stop_run; std::atomic<bool> stop_run{false};
std::mutex running_mutex; std::mutex running_mutex;
std::condition_variable running_cv; std::condition_variable running_cv;