Skip to content

Commit

Permalink
Fix #410
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Feb 19, 2024
1 parent 4b4460f commit 2532a8e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Plugins/Renderer/gl_local.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ extern int gly;
extern int glwidth;
extern int glheight;

extern bool bEnforceStretchAspect;
extern bool bNoStretchAspect;
extern bool bUseBindless;
extern bool bUseOITBlend;
//extern bool bVerticalFov;//unused
Expand Down
8 changes: 4 additions & 4 deletions Plugins/Renderer/gl_rmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ FBO_Container_t s_ShadowFBO = { 0 };
FBO_Container_t* g_CurrentSceneFBO = NULL;
FBO_Container_t *g_CurrentRenderingFBO = NULL;

bool bEnforceStretchAspect = false;
bool bNoStretchAspect = true;
bool bUseBindless = true;
bool bUseOITBlend = false;
//bool bVerticalFov = false;
Expand Down Expand Up @@ -1746,7 +1746,7 @@ void GL_Init(void)

glGetIntegerv(GL_MAX_UNIFORM_BLOCK_SIZE, &gl_max_ubo_size);

bEnforceStretchAspect = (gEngfuncs.CheckParm("-stretchaspect", NULL) == 0);
bNoStretchAspect = (gEngfuncs.CheckParm("-stretchaspect", NULL) == 0);

if(gEngfuncs.CheckParm("-nobindless", NULL))
bUseBindless = false;
Expand Down Expand Up @@ -2241,7 +2241,7 @@ void GL_EndRendering(void)
float fSrcAspect = (float)srcW / (float)srcH;
float fDstAspect = (float)dstX2 / (float)dstY2;

if (bEnforceStretchAspect)
if (bNoStretchAspect)
{
if (fSrcAspect > fDstAspect)
{
Expand All @@ -2257,7 +2257,7 @@ void GL_EndRendering(void)
float fDiff = dstX2 - fDesiredHeight;
dstX1 = fDiff / 2;
dstX2 = dstX2 - dstX1;
(*s_fXMouseAspectAdjustment) = fSrcAspect / fDstAspect;
(*s_fXMouseAspectAdjustment) = fDstAspect / fSrcAspect;
}
}

Expand Down

0 comments on commit 2532a8e

Please sign in to comment.