avoid leaking threads in NDSCart_SRAMManager

also atomics
This commit is contained in:
RSDuck
2021-03-11 16:54:27 +01:00
parent ae7761c33e
commit bc63531e00
3 changed files with 150 additions and 140 deletions

View File

@ -21,6 +21,7 @@
#include "GPU3D.h"
#include "Platform.h"
#include <thread>
#include <atomic>
namespace GPU3D
{
@ -506,8 +507,8 @@ private:
bool Threaded;
Platform::Thread* RenderThread;
bool RenderThreadRunning;
bool RenderThreadRendering;
std::atomic_bool RenderThreadRunning;
std::atomic_bool RenderThreadRendering;
Platform::Semaphore* Sema_RenderStart;
Platform::Semaphore* Sema_RenderDone;
Platform::Semaphore* Sema_ScanlineCount;