Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up. SDL-1.2
authorSam Lantinga <slouken@libsdl.org>
Sat, 10 Oct 2009 15:10:06 +0000
branchSDL-1.2
changeset 4319 edefeb52a627
parent 4318 34a0a589b9c4
child 4320 33d306630296
Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up.
src/video/quartz/SDL_QuartzVideo.m
--- 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 ();