More sensible support for gamma settings.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@331 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
dbf313157a
commit
8473252e1a
2 changed files with 12 additions and 13 deletions
|
@ -1021,7 +1021,6 @@ void R_SetRenderer(r_qrenderer_t wanted)
|
|||
}
|
||||
|
||||
|
||||
extern float v_oldgammavalue;
|
||||
qboolean R_ApplyRenderer (rendererstate_t *newr)
|
||||
{
|
||||
int i, j;
|
||||
|
@ -1071,7 +1070,7 @@ qboolean R_ApplyRenderer (rendererstate_t *newr)
|
|||
{
|
||||
qbyte *data;
|
||||
isDedicated = false;
|
||||
v_oldgammavalue = -1; //force the gamma to be reset
|
||||
v_gamma.modified = true; //force the gamma to be reset
|
||||
|
||||
Con_Printf("Setting mode %i*%i*%i*%i\n", newr->width, newr->height, newr->bpp, newr->rate);
|
||||
|
||||
|
@ -1145,7 +1144,7 @@ TRACE(("dbg: R_ApplyRenderer: vid applied\n"));
|
|||
|
||||
TRACE(("dbg: R_ApplyRenderer: done palette\n"));
|
||||
|
||||
v_oldgammavalue = -1; //force the gamma to be reset
|
||||
v_gamma.modified = true; //force the gamma to be reset
|
||||
W_LoadWadFile("gfx.wad");
|
||||
TRACE(("dbg: R_ApplyRenderer: wad loaded\n"));
|
||||
Draw_Init();
|
||||
|
|
|
@ -351,19 +351,19 @@ void BuildGammaTable (float g, float c)
|
|||
V_CheckGamma
|
||||
=================
|
||||
*/
|
||||
float v_oldgammavalue;
|
||||
float v_oldcontrastvalue;
|
||||
qboolean V_CheckGamma (void)
|
||||
{
|
||||
if (v_gamma.value == v_oldgammavalue && v_contrast.value == v_oldcontrastvalue)
|
||||
return false;
|
||||
v_oldcontrastvalue = v_contrast.value;
|
||||
v_oldgammavalue = v_gamma.value;
|
||||
if (v_gamma.modified || v_contrast.modified)
|
||||
{
|
||||
v_contrast.modified = false;
|
||||
v_gamma.modified = false;
|
||||
|
||||
BuildGammaTable (v_gamma.value, v_contrast.value);
|
||||
vid.recalc_refdef = 1; // force a surface cache flush
|
||||
|
||||
return true;
|
||||
BuildGammaTable (v_gamma.value, v_contrast.value);
|
||||
vid.recalc_refdef = 1; // force a surface cache flush
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue