Skip to content

Commit

Permalink
Restore setting r_colorbits in q3_ui
Browse files Browse the repository at this point in the history
In 2007 in ioquake3 unified-sdl branch (revision 1144) setting
r_colorbits in q3_ui was removed but the Color Depth menu option was
still kept. Setting r_colorbits was not removed from the Team Arena UI.

In 2011 I removed the Color Depth menu option from q3_ui as it did not
change any cvars. Yesterday I restored the option not realizing this
and thinking that requesting 16-bit color depth worked.

Add setting r_colorbits back to q3_ui so Color Depth menu option works
again. I changed Color Depth options 'Default' to reset r_stencilbits
instead of 0 and '32 bit' to use r_stencilbits 8 instead of not changing
the value.

However I discovered r_colorbits 16 does not actually work on my system
(Debian Jessie x86_64 nvidia). ioquake3 was reporting the requested
value instead of the actual obtained value. Fixed in my previous commit.
  • Loading branch information
zturtleman committed Apr 11, 2018
1 parent 7e9b92d commit 61404e2
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions code/q3_ui/ui_video.c
Expand Up @@ -679,11 +679,24 @@ static void GraphicsOptions_ApplyChanges( void *unused, int notification )
trap_Cvar_SetValue( "r_mode", s_graphicsoptions.mode.curvalue );

trap_Cvar_SetValue( "r_fullscreen", s_graphicsoptions.fs.curvalue );

trap_Cvar_Reset("r_colorbits");
trap_Cvar_Reset("r_depthbits");
trap_Cvar_Reset("r_stencilbits");

switch ( s_graphicsoptions.colordepth.curvalue )
{
case 0:
trap_Cvar_SetValue( "r_colorbits", 0 );
trap_Cvar_SetValue( "r_depthbits", 0 );
trap_Cvar_Reset( "r_stencilbits" );
break;
case 1:
trap_Cvar_SetValue( "r_colorbits", 16 );
trap_Cvar_SetValue( "r_depthbits", 16 );
trap_Cvar_SetValue( "r_stencilbits", 0 );
break;
case 2:
trap_Cvar_SetValue( "r_colorbits", 32 );
trap_Cvar_SetValue( "r_depthbits", 24 );
trap_Cvar_SetValue( "r_stencilbits", 8 );
break;
}
trap_Cvar_SetValue( "r_vertexLight", s_graphicsoptions.lighting.curvalue );

if ( s_graphicsoptions.geometry.curvalue == 2 )
Expand Down

0 comments on commit 61404e2

Please sign in to comment.