1
0
Fork 0

Codefix: Null video driver: take the game lock

The game loop must run with the game lock held.
pull/13467/head
Matthias Urlichs 2025-02-05 06:40:50 +01:00
parent abdea49d24
commit bac9bf93bc
1 changed files with 4 additions and 1 deletions

View File

@ -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();
}