From 70aac0f460a9e57956de00ae5d84d8bb4bf4643c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sun, 27 Sep 2020 19:21:16 +0300 Subject: Fixes: PS2/PS2-like menu, Hud, new sliding text found --- src/render/Draw.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/render/Draw.cpp') diff --git a/src/render/Draw.cpp b/src/render/Draw.cpp index db87e76d..4e323ec2 100644 --- a/src/render/Draw.cpp +++ b/src/render/Draw.cpp @@ -70,3 +70,14 @@ CDraw::SetFOV(float fov) #endif ms_fFOV = fov; } + +#ifdef ASPECT_RATIO_SCALE +float +ScaleAndCenterX(float x) +{ + if (SCREEN_WIDTH == DEFAULT_SCREEN_WIDTH) + return x; + else + return (SCREEN_WIDTH - SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH)) / 2 + SCREEN_SCALE_X(x); +} +#endif \ No newline at end of file -- cgit v1.2.3