source: users/toby/ports/devel/libsdl-devel/files/patch-src__video__cocoa__SDL_cocoamodes.m @ 54397

Last change on this file since 54397 was 54397, checked in by toby@…, 10 years ago

almost-working libsdl-devel port (actually builds on SL)

File size: 1.3 KB
Line 
1--- src/video/cocoa/SDL_cocoamodes.m.orig       2009-07-16 16:46:13.000000000 -0700
2+++ src/video/cocoa/SDL_cocoamodes.m    2009-07-16 16:46:22.000000000 -0700
3@@ -23,24 +23,6 @@
4 
5 #include "SDL_cocoavideo.h"
6 
7-/*
8-    Add methods to get at private members of NSScreen.
9-    Since there is a bug in Apple's screen switching code
10-    that does not update this variable when switching
11-    to fullscreen, we'll set it manually (but only for the
12-    main screen).
13-*/
14-@interface NSScreen (NSScreenAccess)
15-- (void) setFrame:(NSRect)frame;
16-@end
17-
18-@implementation NSScreen (NSScreenAccess)
19-- (void) setFrame:(NSRect)frame;
20-{
21-    _frame = frame;
22-}
23-@end
24-
25 static void
26 CG_SetError(const char *prefix, CGDisplayErr result)
27 {
28@@ -248,15 +230,6 @@
29         CGReleaseDisplayFadeReservation(fade_token);
30     }
31 
32-    /*
33-        There is a bug in Cocoa where NSScreen doesn't synchronize
34-        with CGDirectDisplay, so the main screen's frame is wrong.
35-        As a result, coordinate translation produces incorrect results.
36-        We can hack around this bug by setting the screen rect
37-        ourselves. This hack should be removed if/when the bug is fixed.
38-    */
39-    [[NSScreen mainScreen] setFrame:NSMakeRect(0,0,mode->w,mode->h)];
40-
41     return 0;
42 
43     /* Since the blanking window covers *all* windows (even force quit) correct recovery is crucial */
Note: See TracBrowser for help on using the repository browser.