Disabled capturing when changing resolution.
authorOlle HÃ¥kansson <ollhak@gmail.com>
Sun, 20 Apr 2014 21:15:56 +0000 (23:15 +0200)
committerthefiddler <stapostol@gmail.com>
Thu, 24 Apr 2014 11:45:05 +0000 (13:45 +0200)
Might be off here, but without capturing it seems like we get a
behaviour closer to that of the PC.

Source/OpenTK/Platform/MacOS/QuartzDisplayDeviceDriver.cs

index 0982fb2..79703cc 100644 (file)
@@ -161,10 +161,10 @@ namespace OpenTK.Platform.MacOS
                 
                 if (width == resolution.Width && height == resolution.Height && bpp == resolution.BitsPerPixel && System.Math.Abs(freq - resolution.RefreshRate) < 1e-6)
                 {
-                    if (displaysCaptured.Contains(display) == false)
-                    {
-                        CG.DisplayCapture(display);
-                    }
+//                    if (displaysCaptured.Contains(display) == false)
+//                    {
+//                        CG.DisplayCapture(display);
+//                    }
                     
                     Debug.Print("Changing resolution to {0}x{1}x{2}@{3}.", width, height, bpp, freq);
                     
@@ -186,7 +186,7 @@ namespace OpenTK.Platform.MacOS
                 Debug.Print("Restoring resolution.");
                 
                 CG.DisplaySwitchToMode(display, storedModes[display]);
-                CG.DisplayRelease(display);
+                //CG.DisplayRelease(display);
                 displaysCaptured.Remove(display);
                 
                 return true;