Partially fix thread safety issues around _cur_palette
Replaces: 4c59dfb6
See also: https://github.com/OpenTTD/OpenTTD/issues/8712
This commit is contained in:
@@ -174,7 +174,12 @@ void VideoDriver::Tick()
|
||||
this->PopulateSystemSprites();
|
||||
}
|
||||
|
||||
this->CheckPaletteAnim();
|
||||
{
|
||||
extern std::mutex _cur_palette_mutex;
|
||||
std::lock_guard<std::mutex> lock_state(_cur_palette_mutex);
|
||||
this->CheckPaletteAnim();
|
||||
}
|
||||
|
||||
this->Paint();
|
||||
|
||||
this->UnlockVideoBuffer();
|
||||
|
||||
Reference in New Issue
Block a user