diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-09-27 19:21:16 +0300 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-09-27 19:22:21 +0300 |
commit | 70aac0f460a9e57956de00ae5d84d8bb4bf4643c (patch) | |
tree | 92e3d8073b6e9e4ad8ae3ee7d8a2460c7e079cca /src/render/Draw.cpp | |
parent | 9b7642454006f4c6b93d57297f88b2899e3f0077 (diff) |
Fixes: PS2/PS2-like menu, Hud, new sliding text found
Diffstat (limited to 'src/render/Draw.cpp')
-rw-r--r-- | src/render/Draw.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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 |