X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Ffreeglut_gamemode.c;h=deeb63f44d413a1fa1e4ad9b540d591861c2918f;hb=30a17103f55ae1c71020b25e74f869907de0bef0;hp=e590385e0796c535c2da36f28d6cae65ec5a03c5;hpb=a1ced88869018df6cc167949660305325dfdd840;p=freeglut diff --git a/src/freeglut_gamemode.c b/src/freeglut_gamemode.c index e590385..deeb63f 100644 --- a/src/freeglut_gamemode.c +++ b/src/freeglut_gamemode.c @@ -58,7 +58,8 @@ static int xrandr_resize(int xsz, int ysz, int rate, int just_checking) /* we only heed the rate if we CAN actually use it (Xrandr >= 1.1) and * the user actually cares about it (rate > 0) */ - use_rate = rate > 0 && ver_major >= 1 && ver_minor >= 1; + use_rate = ( rate > 0 ) && ( ( ver_major >= 1 ) || + ( ver_major == 1 ) && ( ver_minor >= 1 ) ); /* this loop is only so that the whole thing will be repeated if someone * else changes video mode between our query the current information and @@ -104,7 +105,7 @@ static int xrandr_resize(int xsz, int ysz, int rate, int just_checking) if(res_idx == -1) break; /* no matching resolution */ -#if RANDR_MAJOR >= 1 && RANDR_MINOR >= 1 +#if ( RANDR_MAJOR >= 1 ) || ( ( RANDR_MAJOR == 1 ) && ( RANDR_MINOR >= 1 ) ) if(rate <= 0) { fgState.GameModeRefresh = XRRConfigCurrentRate(xrr_config); } @@ -133,7 +134,7 @@ static int xrandr_resize(int xsz, int ysz, int rate, int just_checking) break; } -#if RANDR_MAJOR >= 1 && RANDR_MINOR >= 1 +#if ( RANDR_MAJOR >= 1 ) || ( ( RANDR_MAJOR == 1 ) && ( RANDR_MINOR >= 1 ) ) if(use_rate) result = XRRSetScreenConfigAndRate(fgDisplay.Display, xrr_config, fgDisplay.RootWindow, res_idx, rot, rate, timestamp); @@ -193,7 +194,7 @@ static void fghRememberState( void ) fgDisplay.prev_ysz = ssizes[curr].height; fgDisplay.prev_refresh = -1; -# if RANDR_MAJOR >= 1 && RANDR_MINOR >= 1 +# if ( RANDR_MAJOR >= 1 ) || ( ( RANDR_MAJOR == 1 ) && ( RANDR_MINOR >= 1 ) ) if(fgState.GameModeRefresh != -1) { fgDisplay.prev_refresh = XRRConfigCurrentRate(xrr_config); }