Skip to content

Commit

Permalink
Fixed bug 3722 - Fall back to xinerama/xvidmode if xrandr modes initi…
Browse files Browse the repository at this point in the history
…alization fails

Levi Bard

In some environments, xrandr modes initialization can fail even though xrandr support is present and of a sufficient version.
(The one I encountered was an AWS instance running a virtual display)

The attached patch allows SDL to keep trying other methods if xrandr modes initialization fails (still subject to SDL_VIDEO_X11_REQUIRE_XRANDR).
  • Loading branch information
slouken committed Aug 2, 2017
1 parent 4be0667 commit 082f32d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/x11/SDL_x11modes.c
Expand Up @@ -604,7 +604,8 @@ X11_InitModes(_THIS)
/* require at least XRandR v1.3 */
if (CheckXRandR(data->display, &xrandr_major, &xrandr_minor) &&
(xrandr_major >= 2 || (xrandr_major == 1 && xrandr_minor >= 3))) {
return X11_InitModes_XRandR(_this);
if (X11_InitModes_XRandR(_this) == 0)
return 0;
}
#endif /* SDL_VIDEO_DRIVER_X11_XRANDR */

Expand Down

0 comments on commit 082f32d

Please sign in to comment.