1
0
Fork 0

Compare commits

...

3 Commits

Author SHA1 Message Date
Matthias Urlichs 34788b433b
Merge bac9bf93bc into 1d38cbafcb 2025-07-13 23:10:26 +00:00
Matthias Urlichs bac9bf93bc Codefix: Null video driver: take the game lock
The game loop must run with the game lock held.
2025-02-05 06:40:50 +01:00
Matthias Urlichs abdea49d24 Codechange: Null video driver: End on game exit
The Null driver now exits when the game ends.

It also gains the ability to run for an unlimited number of
ticks (using '-v null:ticks=0').
2025-02-04 20:47:51 +01:00
1 changed files with 5 additions and 2 deletions

View File

@ -50,8 +50,11 @@ void VideoDriver_Null::MainLoop()
{
uint i;
for (i = 0; i < this->ticks; i++) {
::GameLoop();
for (i = 0; i < this->ticks && ! _exit_game; i++) {
{
std::lock_guard<std::mutex> lock(this->game_state_mutex);
::GameLoop();
}
::InputLoop();
::UpdateWindows();
}