1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-20 21:19:10 +00:00

Change: [OSX] Recreate backing store if the colour profile of the screen (or the screen) the game window is one changes.

This will result in changing colours if moving OpenTTD from one screen to another, but should avoid performance problems if the window is moved.
This commit is contained in:
Michael Lutz
2019-09-14 17:57:26 +02:00
committed by Niels Martin Hansen
parent 7653def300
commit fb8f4119f3
2 changed files with 6 additions and 0 deletions
src/video/cocoa

@@ -271,6 +271,7 @@ uint QZ_ListModes(OTTD_Point *modes, uint max_modes, CGDirectDisplayID display_i
- (BOOL)windowShouldClose:(id)sender;
- (void)windowDidEnterFullScreen:(NSNotification *)aNotification;
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification;
@end

@@ -1362,6 +1362,11 @@ static const char *Utf8AdvanceByUtf16Units(const char *str, NSUInteger count)
[ e release ];
}
}
/** The colour profile of the screen the window is on changed. */
- (void)windowDidChangeScreenProfile:(NSNotification *)aNotification
{
if (!driver->setup) driver->WindowResized();
}
@end