Mark main thread as the game thread if video driver not using threads
This commit is contained in:
@@ -103,6 +103,8 @@ void VideoDriver::StartGameThread()
|
|||||||
this->is_game_threaded = StartNewThread(&this->game_thread, "ottd:game", &VideoDriver::GameThreadThunk, this);
|
this->is_game_threaded = StartNewThread(&this->game_thread, "ottd:game", &VideoDriver::GameThreadThunk, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!this->is_game_threaded) SetSelfAsGameThread();
|
||||||
|
|
||||||
DEBUG(driver, 1, "using %sthread for game-loop", this->is_game_threaded ? "" : "no ");
|
DEBUG(driver, 1, "using %sthread for game-loop", this->is_game_threaded ? "" : "no ");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user