Skip to content

Commit

Permalink
Refuse to make a window that's too large. Some systems (x11) freak ou…
Browse files Browse the repository at this point in the history
…t at this.

Fixes Bugzilla #2255.
  • Loading branch information
icculus committed Apr 6, 2015
1 parent b88ca1b commit 8011557
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/video/SDL_video.c
Expand Up @@ -1260,6 +1260,12 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
h = 1;
}

/* Some platforms blow up if the windows are too large. Raise it later? */
if ((w > 16384) || (h > 16384)) {
SDL_SetError("Window is too large.");
return NULL;
}

/* Some platforms have OpenGL enabled by default */
#if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
flags |= SDL_WINDOW_OPENGL;
Expand Down

0 comments on commit 8011557

Please sign in to comment.