diff src/video/quartz/SDL_QuartzVideo.m @ 4319:edefeb52a627 SDL-1.2

Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up.
author Sam Lantinga <slouken@libsdl.org>
date Sat, 10 Oct 2009 15:10:06 +0000
parents 719faf118c38
children 0deabd35275b
line wrap: on
line diff
--- a/src/video/quartz/SDL_QuartzVideo.m	Sat Oct 10 15:06:04 2009 +0000
+++ b/src/video/quartz/SDL_QuartzVideo.m	Sat Oct 10 15:10:06 2009 +0000
@@ -203,6 +203,19 @@
     /* Initialize the video settings; this data persists between mode switches */
     display_id = kCGDirectMainDisplay;
 
+#if 0 /* The mouse event code needs to take this into account... */
+    env = getenv("SDL_VIDEO_FULLSCREEN_DISPLAY");
+    if ( env ) {
+        int monitor = SDL_atoi(env);
+    	CGDirectDisplayID activeDspys [3];
+    	CGDisplayCount dspyCnt;
+    	CGGetActiveDisplayList (3, activeDspys, &dspyCnt);
+        if ( monitor >= 0 && monitor < dspyCnt ) {
+    	    display_id = activeDspys[monitor];
+        }
+    }
+#endif
+
     save_mode  = CGDisplayCurrentMode    (display_id);
     mode_list  = CGDisplayAvailableModes (display_id);
     palette    = CGPaletteCreateDefaultColorPalette ();