mirror of https://github.com/OpenTTD/OpenTTD
Codefix: Null video driver: take the game lock
The game loop must run with the game lock held.pull/13467/head
parent
abdea49d24
commit
bac9bf93bc
|
@ -51,7 +51,10 @@ void VideoDriver_Null::MainLoop()
|
|||
uint i;
|
||||
|
||||
for (i = 0; i < this->ticks && ! _exit_game; i++) {
|
||||
::GameLoop();
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(this->game_state_mutex);
|
||||
::GameLoop();
|
||||
}
|
||||
::InputLoop();
|
||||
::UpdateWindows();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue