mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-01-09 14:25:32 +00:00
Don't fail to create a window if it's too large, just clamp it to the max instead
Some window is better than no window... (cherry picked from commit 4a18893c73a4a6b963384e186c1b70c6f6cb08a4)
This commit is contained in:
parent
f7dc8c0eaa
commit
c4c034ca4b
|
@ -1622,9 +1622,11 @@ SDL_Window *SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint
|
|||
}
|
||||
|
||||
/* 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;
|
||||
if (w > 16384) {
|
||||
w = 16384;
|
||||
}
|
||||
if (h > 16384) {
|
||||
h = 16384;
|
||||
}
|
||||
|
||||
/* ensure no more than one of these flags is set */
|
||||
|
|
Loading…
Reference in a new issue