mirror of https://github.com/encounter/SDL.git
Refuse to make a window that's too large. Some systems (x11) freak out at this.
Fixes Bugzilla #2255.
This commit is contained in:
parent
b88ca1b4a6
commit
8011557458
|
@ -1260,6 +1260,12 @@ SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
|
||||||
h = 1;
|
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 */
|
/* Some platforms have OpenGL enabled by default */
|
||||||
#if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
|
#if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
|
||||||
flags |= SDL_WINDOW_OPENGL;
|
flags |= SDL_WINDOW_OPENGL;
|
||||||
|
|
Loading…
Reference in New Issue