rename to vid_scale

This commit is contained in:
Eric Wasylishen 2017-05-17 11:51:27 -06:00
parent 8058d0b43e
commit b897038c32
2 changed files with 7 additions and 13 deletions

View File

@ -184,7 +184,7 @@ R_Postprocess
Performs:
- GLSL gamma correction (requires OpenGL 2.0)
- framebuffer scaling (vid_scaled) (any OpenGL version)
- framebuffer scaling (vid_scale) (any OpenGL version)
=============
*/
void R_Postprocess (void)

View File

@ -154,7 +154,7 @@ static cvar_t vid_borderless = {"vid_borderless", "0", CVAR_ARCHIVE}; // QuakeSp
cvar_t vid_gamma = {"gamma", "1", CVAR_ARCHIVE}; //johnfitz -- moved here from view.c
cvar_t vid_contrast = {"contrast", "1", CVAR_ARCHIVE}; //QuakeSpasm, MarkV
cvar_t vid_scaled = {"vid_scaled", "0", CVAR_ARCHIVE}; // QuakeSpasm, MarkV
cvar_t vid_scale = {"vid_scale", "1", CVAR_ARCHIVE}; // QuakeSpasm
//==========================================================================
//
@ -356,7 +356,7 @@ static int VID_GetCurrentHeight (void)
VID_CalcRenderSize
returns the size that we will render to, possilby smaller than the actual
framebuffer size if the vid_scaled cvar is in use.
framebuffer size if the vid_scale cvar is in use.
=======================
*/
static void VID_GetRenderSize (int *w, int *h)
@ -370,13 +370,7 @@ static void VID_GetRenderSize (int *w, int *h)
*h = draw_context->h;
#endif
if (vid_scaled.value == 1) {
scale_factor = 1/2.0f;
} else if (vid_scaled.value == 2) {
scale_factor = 1/3.0f;
} else {
scale_factor = 1.0f;
}
scale_factor = 1.0f / CLAMP(1.0f, vid_scale.value, 4.0f);
*w *= scale_factor;
*h *= scale_factor;
@ -1543,7 +1537,7 @@ void VID_Init (void)
"vid_fsaa",
"vid_desktopfullscreen",
"vid_borderless",
"vid_scaled"};
"vid_scale"};
#define num_readvars ( sizeof(read_vars)/sizeof(read_vars[0]) )
Cvar_RegisterVariable (&vid_fullscreen); //johnfitz
@ -1554,7 +1548,7 @@ void VID_Init (void)
Cvar_RegisterVariable (&vid_fsaa); //QuakeSpasm
Cvar_RegisterVariable (&vid_desktopfullscreen); //QuakeSpasm
Cvar_RegisterVariable (&vid_borderless); //QuakeSpasm
Cvar_RegisterVariable (&vid_scaled); //QuakeSpasm
Cvar_RegisterVariable (&vid_scale); //QuakeSpasm
Cvar_SetCallback (&vid_fullscreen, VID_Changed_f);
Cvar_SetCallback (&vid_width, VID_Changed_f);
Cvar_SetCallback (&vid_height, VID_Changed_f);
@ -1563,7 +1557,7 @@ void VID_Init (void)
Cvar_SetCallback (&vid_fsaa, VID_FSAA_f);
Cvar_SetCallback (&vid_desktopfullscreen, VID_Changed_f);
Cvar_SetCallback (&vid_borderless, VID_Changed_f);
Cvar_SetCallback (&vid_scaled, VID_Changed_f);
Cvar_SetCallback (&vid_scale, VID_Changed_f);
Cmd_AddCommand ("vid_unlock", VID_Unlock); //johnfitz
Cmd_AddCommand ("vid_restart", VID_Restart); //johnfitz