- repaired the video scaling code

This commit is contained in:
Rachael Alexanderson 2017-12-10 04:22:13 -05:00
parent ebb926e7b0
commit 1559d74c2c
2 changed files with 4 additions and 3 deletions

View file

@ -75,7 +75,6 @@
#include "r_videoscale.h"
EXTERN_CVAR(Int, screenblocks)
EXTERN_CVAR(Int, vid_scalemode)
CVAR(Bool, gl_scale_viewport, true, CVAR_ARCHIVE);
@ -312,7 +311,10 @@ void FGLRenderer::SetOutputViewport(GL_IRECT *bounds)
mSceneViewport.height = height;
// Scale viewports to fit letterbox
if ((gl_scale_viewport && !framebuffer->IsFullscreen() && vid_scalemode == 0) || !FGLRenderBuffers::IsEnabled())
bool notScaled = ((mScreenViewport.width == ViewportScaledWidth(mScreenViewport.width, mScreenViewport.height)) &&
(mScreenViewport.width == ViewportScaledHeight(mScreenViewport.width, mScreenViewport.height)) &&
!ViewportIsScaled43());
if ((gl_scale_viewport && !framebuffer->IsFullscreen() && notScaled) || !FGLRenderBuffers::IsEnabled())
{
mScreenViewport.width = mOutputLetterbox.width;
mScreenViewport.height = mOutputLetterbox.height;

View file

@ -56,7 +56,6 @@
EXTERN_CVAR (Float, vid_brightness)
EXTERN_CVAR (Float, vid_contrast)
EXTERN_CVAR (Bool, vid_vsync)
EXTERN_CVAR(Int, vid_scalemode)
CVAR(Bool, gl_aalines, false, CVAR_ARCHIVE)