mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- make menu scale adjustments for ultra-wide aspect ratios.
This commit is contained in:
parent
bc566fac4e
commit
dfdf330722
1 changed files with 6 additions and 0 deletions
|
@ -281,6 +281,12 @@ void V_UpdateModeSize (int width, int height)
|
|||
CleanHeight = screen->GetHeight() / CleanYfac;
|
||||
|
||||
int w = screen->GetWidth();
|
||||
int h = screen->GetHeight();
|
||||
|
||||
// clamp screen aspect ratio to 17:10, for anything wider the width will be reduced
|
||||
double aspect = (double)w / h;
|
||||
if (aspect > 1.7) w = int(w * 1.7 / aspect);
|
||||
|
||||
int factor;
|
||||
if (w < 640) factor = 1;
|
||||
else if (w >= 1024 && w < 1280) factor = 2;
|
||||
|
|
Loading…
Reference in a new issue