# HG changeset patch # User Sam Lantinga # Date 1252144485 0 # Node ID c843261f74a443d370ad0fb584e1a4f226812bbc # Parent d984d5bb17e9d1524d18c8bea6c1191aca8bc33a From: Jjgod Jiang Date: Sat, 5 Sep 2009 17:27:07 +0800 Disable NSScreen setFrame: hack in 10.6 since it no longer work diff -r d984d5bb17e9 -r c843261f74a4 src/video/cocoa/SDL_cocoamodes.m --- a/src/video/cocoa/SDL_cocoamodes.m Sat Sep 05 09:51:39 2009 +0000 +++ b/src/video/cocoa/SDL_cocoamodes.m Sat Sep 05 09:54:45 2009 +0000 @@ -23,6 +23,7 @@ #include "SDL_cocoavideo.h" +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 /* Add methods to get at private members of NSScreen. Since there is a bug in Apple's screen switching code @@ -40,6 +41,7 @@ _frame = frame; } @end +#endif static void CG_SetError(const char *prefix, CGDisplayErr result) @@ -248,6 +250,7 @@ CGReleaseDisplayFadeReservation(fade_token); } +#if MAC_OS_X_VERSION_MAX_ALLOWED < 1060 /* There is a bug in Cocoa where NSScreen doesn't synchronize with CGDirectDisplay, so the main screen's frame is wrong. @@ -256,6 +259,7 @@ ourselves. This hack should be removed if/when the bug is fixed. */ [[NSScreen mainScreen] setFrame:NSMakeRect(0,0,mode->w,mode->h)]; +#endif return 0;