diff --git a/Source/Core/Common/BlockingLoop.h b/Source/Core/Common/BlockingLoop.h index 4e4094da53..472a84b1f6 100644 --- a/Source/Core/Common/BlockingLoop.h +++ b/Source/Core/Common/BlockingLoop.h @@ -21,15 +21,15 @@ namespace Common class BlockingLoop { public: - enum StopMode + enum class StopMode { - kNonBlock, - kBlock, - kBlockAndGiveUp, + NonBlock, + Block, + BlockAndGiveUp, }; BlockingLoop() { m_stopped.Set(); } - ~BlockingLoop() { Stop(kBlockAndGiveUp); } + ~BlockingLoop() { Stop(StopMode::BlockAndGiveUp); } // Triggers to rerun the payload of the Run() function at least once again. // This function will never block and is designed to finish as fast as possible. void Wakeup() @@ -200,7 +200,7 @@ public: // Quits the main loop. // By default, it will wait until the main loop quits. // Be careful to not use the blocking way within the payload of the Run() method. - void Stop(StopMode mode = kBlock) + void Stop(StopMode mode = StopMode::Block) { if (m_stopped.IsSet()) return; @@ -212,12 +212,12 @@ public: switch (mode) { - case kNonBlock: + case StopMode::NonBlock: break; - case kBlock: + case StopMode::Block: Wait(); break; - case kBlockAndGiveUp: + case StopMode::BlockAndGiveUp: WaitYield(std::chrono::milliseconds(100), [&] { // If timed out, assume no one will come along to call Run, so force a break m_stopped.Set(); diff --git a/Source/Core/VideoCommon/Fifo.cpp b/Source/Core/VideoCommon/Fifo.cpp index cf5327ecd3..3e6a6dd2ec 100644 --- a/Source/Core/VideoCommon/Fifo.cpp +++ b/Source/Core/VideoCommon/Fifo.cpp @@ -131,7 +131,7 @@ void FifoManager::ExitGpuLoop(Core::System& system) // Terminate GPU thread loop m_emu_running_state.Set(); - m_gpu_mainloop.Stop(m_gpu_mainloop.kNonBlock); + m_gpu_mainloop.Stop(Common::BlockingLoop::StopMode::NonBlock); } void FifoManager::EmulatorState(bool running)