mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-04 19:39:42 +01:00
Codefix: Null video driver: take the game lock
The game loop must run with the game lock held.
This commit is contained in:
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
Block a user