1
0
Fork 0

Compare commits

...

4 Commits

Author SHA1 Message Date
Matthias Urlichs c934f24719
Merge bac9bf93bc into c69fc76395 2025-07-21 20:00:16 +00:00
Peter Nelson c69fc76395
Codefix: Rail type bridge offset is not a SpriteID. (#14471) 2025-07-21 20:00:04 +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
2 changed files with 6 additions and 3 deletions

View File

@ -184,7 +184,7 @@ public:
/**
* Bridge offset
*/
SpriteID bridge_offset;
uint8_t bridge_offset;
/**
* Original railtype number to use when drawing non-newgrf railtypes, or when drawing stations.

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