mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- do not use clamp for calculation scale factors in Get...Scale.
These operations are not actual clamps and can assert on some implementations.
This commit is contained in:
parent
5630fd8763
commit
5bd53cbe8c
1 changed files with 2 additions and 2 deletions
|
@ -144,7 +144,7 @@ int GetUIScale(F2DDrawer *drawer, int altval)
|
|||
// Default should try to scale to 640x400
|
||||
int vscale = drawer->GetHeight() / 400;
|
||||
int hscale = drawer->GetWidth() / 640;
|
||||
scaleval = clamp(vscale, 1, hscale);
|
||||
scaleval = max(1, min(vscale, hscale));
|
||||
}
|
||||
else scaleval = uiscale;
|
||||
|
||||
|
@ -165,7 +165,7 @@ int GetConScale(F2DDrawer* drawer, int altval)
|
|||
// Default should try to scale to 640x400
|
||||
int vscale = drawer->GetHeight() / 800;
|
||||
int hscale = drawer->GetWidth() / 1280;
|
||||
scaleval = clamp(vscale, 1, hscale);
|
||||
scaleval = max(1, min(vscale, hscale));
|
||||
}
|
||||
else scaleval = (uiscale+1) / 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue