changeset 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 34a0a589b9c4
children 33d306630296
files src/video/quartz/SDL_QuartzVideo.m
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
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 ();