diff options
author | bjarni <bjarni@openttd.org> | 2008-08-09 17:56:31 +0000 |
---|---|---|
committer | bjarni <bjarni@openttd.org> | 2008-08-09 17:56:31 +0000 |
commit | fbef6535a5bcb07ea660bbf1c07c65136caa7d88 (patch) | |
tree | cf2a86f9a06cac03ab895f9ff6968daab60de2f4 /src/video | |
parent | 731685cf64088360f7bd7212b40b75a88c9059c1 (diff) | |
download | openttd-fbef6535a5bcb07ea660bbf1c07c65136caa7d88.tar.xz |
(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)
Diffstat (limited to 'src/video')
-rw-r--r-- | src/video/cocoa/fullscreen.mm | 9 |
1 files changed, 9 insertions, 0 deletions
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; |