diff --git a/pcsx2/MTVU.cpp b/pcsx2/MTVU.cpp index 287c954068..26ec5bf3be 100644 --- a/pcsx2/MTVU.cpp +++ b/pcsx2/MTVU.cpp @@ -100,7 +100,7 @@ VU_Thread::~VU_Thread() void VU_Thread::Open() { - if (m_thread.Joinable()) + if (IsOpen()) return; Reset(); @@ -111,7 +111,7 @@ void VU_Thread::Open() void VU_Thread::Close() { - if (!m_thread.Joinable()) + if (!IsOpen()) return; m_shutdown_flag.store(true, std::memory_order_release); diff --git a/pcsx2/MTVU.h b/pcsx2/MTVU.h index b77d9af709..4215231084 100644 --- a/pcsx2/MTVU.h +++ b/pcsx2/MTVU.h @@ -66,6 +66,8 @@ public: ~VU_Thread(); __fi const Threading::ThreadHandle& GetThreadHandle() const { return m_thread; } + + /// Returns true if the VU thread has been started. __fi bool IsOpen() const { return m_thread.Joinable(); } /// Ensures the VU thread is started.