diff --git a/Source/dthread.cpp b/Source/dthread.cpp index 0a91f85b8..ab12b5ae8 100644 --- a/Source/dthread.cpp +++ b/Source/dthread.cpp @@ -86,7 +86,7 @@ void dthread_start() DthreadRunning = true; DthreadMutex.emplace(); WorkToDo.emplace(); - Thread = { DthreadHandler }; + Thread = SdlThread { DthreadHandler }; } void DThreadCleanup() diff --git a/Source/nthread.cpp b/Source/nthread.cpp index 5f04bee9f..6c6b7f0ee 100644 --- a/Source/nthread.cpp +++ b/Source/nthread.cpp @@ -181,7 +181,7 @@ void nthread_start(bool setTurnUpperBit) sgbThreadIsRunning = false; MemCrit.lock(); nthread_should_run = true; - Thread = { NthreadHandler }; + Thread = SdlThread { NthreadHandler }; } } diff --git a/Source/utils/sdl_thread.h b/Source/utils/sdl_thread.h index 4aac502c1..079ff6ee2 100644 --- a/Source/utils/sdl_thread.h +++ b/Source/utils/sdl_thread.h @@ -34,7 +34,7 @@ public: ErrSdl(); } - SdlThread(void (*handler)(void)) + explicit SdlThread(void (*handler)(void)) : SdlThread(ThreadTranslate, (void *)handler) { }