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 4319edefeb52a627
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
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Sat Oct 10 15:06:04 2009 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Sat Oct 10 15:10:06 2009 +0000
     1.3 @@ -203,6 +203,19 @@
     1.4      /* Initialize the video settings; this data persists between mode switches */
     1.5      display_id = kCGDirectMainDisplay;
     1.6  
     1.7 +#if 0 /* The mouse event code needs to take this into account... */
     1.8 +    env = getenv("SDL_VIDEO_FULLSCREEN_DISPLAY");
     1.9 +    if ( env ) {
    1.10 +        int monitor = SDL_atoi(env);
    1.11 +    	CGDirectDisplayID activeDspys [3];
    1.12 +    	CGDisplayCount dspyCnt;
    1.13 +    	CGGetActiveDisplayList (3, activeDspys, &dspyCnt);
    1.14 +        if ( monitor >= 0 && monitor < dspyCnt ) {
    1.15 +    	    display_id = activeDspys[monitor];
    1.16 +        }
    1.17 +    }
    1.18 +#endif
    1.19 +
    1.20      save_mode  = CGDisplayCurrentMode    (display_id);
    1.21      mode_list  = CGDisplayAvailableModes (display_id);
    1.22      palette    = CGPaletteCreateDefaultColorPalette ();