mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-06-06 15:30:50 +00:00
Fall back to Xlib if XRandR isn't available
This fixes video initialization on headless systems with VNC Fixes https://github.com/libsdl-org/SDL/issues/8054
This commit is contained in:
parent
b7f32f74ce
commit
71099149b8
1 changed files with 3 additions and 2 deletions
|
@ -821,8 +821,9 @@ int X11_InitModes(SDL_VideoDevice *_this)
|
||||||
int xrandr_major, xrandr_minor;
|
int xrandr_major, xrandr_minor;
|
||||||
/* require at least XRandR v1.3 */
|
/* require at least XRandR v1.3 */
|
||||||
if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) &&
|
if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) &&
|
||||||
(xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3))) {
|
(xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3)) &&
|
||||||
return X11_InitModes_XRandR(_this);
|
X11_InitModes_XRandR(_this) == 0) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
|
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue