From 55018aae7edcc7072185c936413d5436378f96f2 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 10 Nov 2019 11:59:22 +0100 Subject: [PATCH] - fixed mouse scaling --- source/common/gamecvars.cpp | 8 ++++---- source/glbackend/hw_draw2d.cpp | 2 ++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index af0250045..909013ac7 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -322,14 +322,14 @@ CUSTOM_CVARD(Float, in_mousesensitivity, DEFAULTMOUSESENSITIVITY, CVAR_ARCHIVE|C CUSTOM_CVARD(Int, in_mousescalex, 65536, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "changes the mouse sensitivity") { - if (self < -4) self = 4; - else if (self > 4) self = 4; + if (self < -4*65536) self = 4 * 65536; + else if (self > 4 * 65536) self = 4 * 65536; } CUSTOM_CVARD(Int, in_mousescaley, 65536, CVAR_ARCHIVE | CVAR_GLOBALCONFIG, "changes the mouse sensitivity") { - if (self < -4) self = 4; - else if (self > 4) self = 4; + if (self < -4 * 65536) self = 4 * 65536; + else if (self > 4 * 65536) self = 4 * 65536; } diff --git a/source/glbackend/hw_draw2d.cpp b/source/glbackend/hw_draw2d.cpp index 694e47275..a1db153df 100644 --- a/source/glbackend/hw_draw2d.cpp +++ b/source/glbackend/hw_draw2d.cpp @@ -94,6 +94,7 @@ void GLInstance::Draw2D(F2DDrawer *drawer) EnableDepthTest(false); EnableMultisampling(false); EnableBlend(true); + EnableAlphaTest(true); auto &vertices = drawer->mVertices; auto &indices = drawer->mIndices; @@ -193,4 +194,5 @@ void GLInstance::Draw2D(F2DDrawer *drawer) SetColor(1, 1, 1); //drawer->mIsFirstPass = false; twod.Clear(); + EnableMultisampling(true); }