From ed6a427fcc2da79827fdb63d8a9945fcf2cd643e Mon Sep 17 00:00:00 2001 From: Michael Lutz Date: Sat, 14 Sep 2019 17:57:26 +0200 Subject: 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. --- src/video/cocoa/cocoa_v.mm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video/cocoa/cocoa_v.mm') diff --git a/src/video/cocoa/cocoa_v.mm b/src/video/cocoa/cocoa_v.mm index 17bca028b..afbca6501 100644 --- a/src/video/cocoa/cocoa_v.mm +++ b/src/video/cocoa/cocoa_v.mm @@ -1360,6 +1360,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 -- cgit v1.2.3-54-g00ecf