mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-13 07:21:31 +00:00
vid scale wip
This commit is contained in:
parent
0b55e95c79
commit
8082c52b94
4 changed files with 14 additions and 0 deletions
|
@ -112,6 +112,9 @@ float map_wateralpha, map_lavaalpha, map_telealpha, map_slimealpha;
|
|||
|
||||
qboolean r_drawflat_cheatsafe, r_fullbright_cheatsafe, r_lightmap_cheatsafe, r_drawworld_cheatsafe; //johnfitz
|
||||
|
||||
cvar_t r_width = {"r_width","0",CVAR_NONE};
|
||||
cvar_t r_height = {"r_height","0",CVAR_NONE};
|
||||
|
||||
//==============================================================================
|
||||
//
|
||||
// GLSL GAMMA CORRECTION
|
||||
|
|
|
@ -232,6 +232,9 @@ void R_Init (void)
|
|||
Cvar_SetCallback (&r_noshadow_list, R_Model_ExtraFlags_List_f);
|
||||
//johnfitz
|
||||
|
||||
Cvar_RegisterVariable (&r_width);
|
||||
Cvar_RegisterVariable (&r_height);
|
||||
|
||||
Cvar_RegisterVariable (&gl_zfix); // QuakeSpasm z-fighting fix
|
||||
Cvar_RegisterVariable (&r_lavaalpha);
|
||||
Cvar_RegisterVariable (&r_telealpha);
|
||||
|
|
|
@ -325,6 +325,9 @@ VID_GetCurrentWidth
|
|||
*/
|
||||
static int VID_GetCurrentWidth (void)
|
||||
{
|
||||
if (r_width.value && r_height.value)
|
||||
return r_width.value;
|
||||
|
||||
#if defined(USE_SDL2)
|
||||
int w = 0, h = 0;
|
||||
SDL_GetWindowSize(draw_context, &w, &h);
|
||||
|
@ -341,6 +344,9 @@ VID_GetCurrentHeight
|
|||
*/
|
||||
static int VID_GetCurrentHeight (void)
|
||||
{
|
||||
if (r_width.value && r_height.value)
|
||||
return r_height.value;
|
||||
|
||||
#if defined(USE_SDL2)
|
||||
int w = 0, h = 0;
|
||||
SDL_GetWindowSize(draw_context, &w, &h);
|
||||
|
|
|
@ -140,6 +140,8 @@ extern cvar_t r_telealpha;
|
|||
extern cvar_t r_slimealpha;
|
||||
extern cvar_t r_dynamic;
|
||||
extern cvar_t r_novis;
|
||||
extern cvar_t r_width;
|
||||
extern cvar_t r_height;
|
||||
|
||||
extern cvar_t gl_clear;
|
||||
extern cvar_t gl_cull;
|
||||
|
|
Loading…
Reference in a new issue