Commit 34458769 authored by Sam Lantinga's avatar Sam Lantinga

From: Jjgod Jiang <gzjjgod@gmail.com>

Date: Sat, 5 Sep 2009 17:27:07 +0800

Disable NSScreen setFrame: hack in 10.6 since it no longer work

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403776
parent b9d44209
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include "SDL_cocoavideo.h" #include "SDL_cocoavideo.h"
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
/* /*
Add methods to get at private members of NSScreen. Add methods to get at private members of NSScreen.
Since there is a bug in Apple's screen switching code Since there is a bug in Apple's screen switching code
...@@ -40,6 +41,7 @@ ...@@ -40,6 +41,7 @@
_frame = frame; _frame = frame;
} }
@end @end
#endif
static void static void
CG_SetError(const char *prefix, CGDisplayErr result) CG_SetError(const char *prefix, CGDisplayErr result)
...@@ -248,6 +250,7 @@ Cocoa_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -248,6 +250,7 @@ Cocoa_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
CGReleaseDisplayFadeReservation(fade_token); CGReleaseDisplayFadeReservation(fade_token);
} }
#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060
/* /*
There is a bug in Cocoa where NSScreen doesn't synchronize There is a bug in Cocoa where NSScreen doesn't synchronize
with CGDirectDisplay, so the main screen's frame is wrong. with CGDirectDisplay, so the main screen's frame is wrong.
...@@ -256,6 +259,7 @@ Cocoa_SetDisplayMode(_THIS, SDL_DisplayMode * mode) ...@@ -256,6 +259,7 @@ Cocoa_SetDisplayMode(_THIS, SDL_DisplayMode * mode)
ourselves. This hack should be removed if/when the bug is fixed. ourselves. This hack should be removed if/when the bug is fixed.
*/ */
[[NSScreen mainScreen] setFrame:NSMakeRect(0,0,mode->w,mode->h)]; [[NSScreen mainScreen] setFrame:NSMakeRect(0,0,mode->w,mode->h)];
#endif
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment