changed the X11 gamemode code policy. Falling back to xf86vm when xrandr fails
authorJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 18 Aug 2014 00:52:53 +0000 (00:52 +0000)
committerJohn Tsiombikas <nuclear@member.fsf.org>
Mon, 18 Aug 2014 00:52:53 +0000 (00:52 +0000)
commit7b2a4bc3ecf84f3abbdbde0f1e006ba7fa998a69
tree0adfd67275bfb1045a71c90106d5192d1376ef8f
parentd9ec500965f477d0cb859dc09f0bc540f7ae0730
changed the X11 gamemode code policy. Falling back to xf86vm when xrandr fails
was problematic when passing invalid modes. Now instead, if xrandr is
available, we use that, and only that. XF86VM is now only used when XR&R is not
supported at all.

I also added a set of env vars to artificially disable one or the other, or
both. If FREEGLUT_NO_XRANDR is set we completely ignore XR&R, and if
FREEGLUT_NO_XF86VM is set, we completely ignore XF86VidMode. Obviously if both
are defined or missing, game mode can't switch resolutions at all any more, but
that's a nice debugging aid, and may be useful to allow the user to pick which
extension he'd rather use for mode switching.

git-svn-id: svn+ssh://svn.code.sf.net/p/freeglut/code/trunk/freeglut/freeglut@1695 7f0cb862-5218-0410-a997-914c9d46530a
src/x11/fg_gamemode_x11.c