Fix menu breaking if resolution is under 640x400.
This commit is contained in:
parent
faed30c118
commit
7bf38fecfe
2 changed files with 6 additions and 4 deletions
|
|
@ -163,8 +163,10 @@ Class DemolitionistMenu : GenericMenu
|
|||
mSmallFont = Font.GetFont('TewiFont');
|
||||
mTinyFont = Font.GetFont('MiniwiFont');
|
||||
// note that we can assume 640x400 will always be the smallest resolution allowed by gzdoom, but we still need to handle widescreen
|
||||
hs = max(min(floor(Screen.GetWidth()/640.),floor(Screen.GetHeight()/266.)),1.);
|
||||
ss = (Screen.GetWidth(),Screen.GetHeight())/hs;
|
||||
double sw = max(Screen.GetWidth(),640);
|
||||
double sh = max(Screen.GetHeight(),400);
|
||||
hs = max(min(floor(sw/640.),floor(sh/266.)),1.);
|
||||
ss = (sw,sh)/hs;
|
||||
ws.x = 640.;
|
||||
double th = 640*(ss.y/ss.x);
|
||||
ws.y = round(th);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue