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 | 14ea857edb2fcc740449cc760915c52b064f009e (patch) | |
tree | cf2a86f9a06cac03ab895f9ff6968daab60de2f4 /src/video | |
parent | 5bcf7de45a3cac393a1d797d2cb1923e93f8165b (diff) | |
download | openttd-14ea857edb2fcc740449cc760915c52b064f009e.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; |