From fbef6535a5bcb07ea660bbf1c07c65136caa7d88 Mon Sep 17 00:00:00 2001 From: bjarni Date: Sat, 9 Aug 2008 17:56:31 +0000 Subject: (svn r14032) -Fix (r13584): [OSX] changed the condition for selecting 8 or 32 bpp blitter by default Now we will pick 32 bpp if no 8 bpp fullscreen resolutions are available on the main display (the one with the dock) --- src/video/cocoa/fullscreen.mm | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/video/cocoa/fullscreen.mm') diff --git a/src/video/cocoa/fullscreen.mm b/src/video/cocoa/fullscreen.mm index d7f542009..d24a3704e 100644 --- a/src/video/cocoa/fullscreen.mm +++ b/src/video/cocoa/fullscreen.mm @@ -155,6 +155,15 @@ uint QZ_ListModes(OTTD_Point* modes, uint max_modes, CGDirectDisplayID display_i return count; } +/* Small function to test if the main display can display 8 bpp in fullscreen */ +bool QZ_CanDisplay8bpp() +{ + OTTD_Point p; + + /* We want to know if 8 bpp is possible in fullscreen and not anything about resolutions. + * Because of this we want to fill a list of 1 resolution of 8 bpp on display 0 (main) and return if we found one. */ + return QZ_ListModes(&p, 1, 0, 8); +} class FullscreenSubdriver: public CocoaSubdriver { int display_width; -- cgit v1.2.3-54-g00ecf