Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Sanity check the window width and height

  • Loading branch information
slouken committed Jan 23, 2012
1 parent c0eba1c commit bc0b07c3113ddef84bd4eefe0dd6d74827d6ef2e
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/video/SDL_video.c
@@ -1145,6 +1145,14 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
}
}

/* 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;

0 comments on commit bc0b07c

Please sign in to comment.