Ensure that sprite aligner click to pick sprites is thread safe

Use a mutex for list of sprite IDs found in (threaded) draw jobs
This commit is contained in:
Jonathan G Rennison
2024-02-04 00:31:11 +00:00
parent 736539280b
commit 3365efa5b2
4 changed files with 29 additions and 5 deletions

View File

@@ -3082,6 +3082,7 @@ void HandleMouseEvents()
/* We are done with the last draw-frame, so we know what sprites we
* clicked on. Reset the picker mode and invalidate the window. */
_newgrf_debug_sprite_picker.mode = SPM_NONE;
_newgrf_debug_sprite_picker.DrawingComplete();
InvalidateWindowData(WC_SPRITE_ALIGNER, 0, 1);
}