mirror of https://github.com/encounter/SDL.git
x11: Ignore BadValue for extremely small XRRSetScreenSize resolutions.
Reference Issue #4840.
This commit is contained in:
parent
db718998bd
commit
1c7bf478ae
|
@ -1011,7 +1011,13 @@ static int (*PreXRRSetScreenSizeErrorHandler)(Display *, XErrorEvent *) = NULL;
|
||||||
static int
|
static int
|
||||||
SDL_XRRSetScreenSizeErrHandler(Display *d, XErrorEvent *e)
|
SDL_XRRSetScreenSizeErrHandler(Display *d, XErrorEvent *e)
|
||||||
{
|
{
|
||||||
return (e->error_code == BadMatch) ? 0 : PreXRRSetScreenSizeErrorHandler(d, e);
|
/* BadMatch: https://github.com/libsdl-org/SDL/issues/4561 */
|
||||||
|
/* BadValue: https://github.com/libsdl-org/SDL/issues/4840 */
|
||||||
|
if ((e->error_code == BadMatch) || (e->error_code == BadValue)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return PreXRRSetScreenSizeErrorHandler(d, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in New Issue