From 609e33421413dafe246ed93c72042450a1a2d4ad Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 10 Oct 2009 15:10:06 +0000 Subject: [PATCH] Added support for SDL_VIDEO_FULLSCREEN_DISPLAY, but mouse events need to be fixed up. --- src/video/quartz/SDL_QuartzVideo.m | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index 0836f2fa6..1313578c1 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -203,6 +203,19 @@ static int QZ_VideoInit (_THIS, SDL_PixelFormat *video_format) /* 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 ();