shithub: choc

Download patch

ref: 14d3126d2fa295df43878c0ce45be37d36eb09c2
parent: 2d6b1a9263855eb78d5dcd35feeab36bb4c1f0f9
author: Simon Howard <fraggle@gmail.com>
date: Sat Oct 26 17:26:56 EDT 2013

Default to windowed mode in OS X, as there is an SDL bug that can cause
crashing in fullscreen mode (thanks Ryan Peel).

Subversion-branch: /branches/v2-branch
Subversion-revision: 2721

--- a/src/i_video.c
+++ b/src/i_video.c
@@ -2060,6 +2060,15 @@
     I_InitWindowIcon();
 #endif
 
+    // Warning to OS X users... though they might never see it :(
+#ifdef __MACOSX__
+    if (fullscreen)
+    {
+        printf("Some old versions of OS X might crash in fullscreen mode.\n"
+               "If this happens to you, switch back to windowed mode.\n");
+    }
+#endif
+
     //
     // Enter into graphics mode.
     //
@@ -2221,5 +2230,14 @@
             screen_bpp = 32;
         }
     }
+#endif
+
+    // Disable fullscreen by default on OS X, as there is an SDL bug
+    // where some old versions of OS X (<= Snow Leopard) crash.
+
+#ifdef __MACOSX__
+    fullscreen = 0;
+    screen_width = 800;
+    screen_height = 600;
 #endif
 }
--- a/src/setup/display.c
+++ b/src/setup/display.c
@@ -743,4 +743,13 @@
         }
     }
 #endif
+
+    // Disable fullscreen by default on OS X, as there is an SDL bug
+    // where some old versions of OS X (<= Snow Leopard) crash.
+
+#ifdef __MACOSX__
+    fullscreen = 0;
+    screen_width = 800;
+    screen_height = 600;
+#endif
 }