diff --git a/libs/common/network_queue.cpp b/libs/common/network_queue.cpp index 6582532..4253dec 100644 --- a/libs/common/network_queue.cpp +++ b/libs/common/network_queue.cpp @@ -7,7 +7,6 @@ #include #include -#include static SDL_sem* lock = SDL_CreateSemaphore(1); static SDL_Thread* queueThread = nullptr; @@ -18,8 +17,6 @@ static bool running = false; static int networkQueue(void*) { UDPNetworkUtility* netUtil = ServiceLocator::Get(); - //this line is the fix for the quirk -// std::cout << "thread running" << std::endl; while(running) { SDL_SemWait(lock); while(netUtil->Receive()) { @@ -34,10 +31,10 @@ static int networkQueue(void*) { } void BeginQueueThread() { + running = true; if (!(queueThread = SDL_CreateThread(networkQueue, nullptr))) { throw(std::runtime_error("Failed to create the network thread")); } - running = true; } void EndQueueThread() {