src/video/quartz/SDL_QuartzWM.m
changeset 876 9e84d106ec19
parent 779 68c8da837fc0
child 934 af585d6efec8
--- a/src/video/quartz/SDL_QuartzWM.m	Thu Mar 11 13:38:51 2004 +0000
+++ b/src/video/quartz/SDL_QuartzWM.m	Mon Mar 22 09:38:20 2004 +0000
@@ -135,7 +135,7 @@
 
     if ( CGDisplayIsCaptured (display_id) ) { /* capture signals fullscreen */
     
-        p->y = CGDisplayPixelsHigh (display_id) - p->y - 1;
+        p->y = CGDisplayPixelsHigh (display_id) - p->y;
     }
     else {
         
@@ -152,7 +152,7 @@
 
     if ( CGDisplayIsCaptured (display_id) ) { /* capture signals fullscreen */
     
-        p->y = CGDisplayPixelsHigh (display_id) - p->y - 1;
+        p->y = CGDisplayPixelsHigh (display_id) - p->y;
     }
     else {
         
@@ -161,6 +161,11 @@
         newPoint = [ window_view convertPoint:*p fromView:[ qz_window contentView ] ];
         
         *p = newPoint;
+
+        /* If OSX version is 10.3.0 or later, we need a workaround in OpenGL mode */
+        if( system_version >= 0x1030 && (SDL_VideoSurface->flags & (SDL_OPENGL | SDL_OPENGLBLIT)) ) {
+            p->y = [window_view frame].size.height - p->y - 1;
+        }
     }
 }