From 3ee8ef55ef043485f514b4b714d82f2a77311cf3 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Mon, 17 Feb 2025 03:57:36 +0100 Subject: [PATCH] Fix scaling of renderDefs when anchored with cstAnchor for my scale to 4:3 hack idRenderWindow::Draw() already calls if(dc->IsMenuScaleFixActive()) { dc->AdjustCoords(&x, &y, &w, &h); } and AdjustCoords() already takes the cst offsets into account, so all that was left to do was making idDeviceContext::IsMenuScaleFixActive() aware of the cst stuff --- neo/ui/DeviceContext.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neo/ui/DeviceContext.h b/neo/ui/DeviceContext.h index e57d0f78..2cd61c63 100644 --- a/neo/ui/DeviceContext.h +++ b/neo/ui/DeviceContext.h @@ -108,7 +108,8 @@ public: // DG: this is used for the "make sure menus are rendered as 4:3" hack void SetMenuScaleFix(bool enable); bool IsMenuScaleFixActive() const { - return fixOffsetForMenu.x != 0.0f || fixOffsetForMenu.y != 0.0f; + // also using this for cstAdjustCoords, it basically means "you need to call AdjustCoords() + return fixOffsetForMenu.x != 0.0f || fixOffsetForMenu.y != 0.0f || cstAdjustCoords; } enum {