src/video/SDL_video.c
changeset 6266 a4be1e781020
parent 6260 fd494c5f305b
child 6296 b42657486c0d
--- a/src/video/SDL_video.c	Sun Jan 22 23:36:59 2012 -0500
+++ b/src/video/SDL_video.c	Sun Jan 22 23:51:46 2012 -0500
@@ -1145,6 +1145,14 @@
         }
     }
 
+    /* Some platforms can't create zero-sized windows */
+    if (w < 1) {
+        w = 1;
+    }
+    if (h < 1) {
+        h = 1;
+    }
+
     /* Some platforms have OpenGL enabled by default */
 #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__
     flags |= SDL_WINDOW_OPENGL;