- fixed: Prevent /0 errors when calculating console scale, which could happen in certain rare situations.

This commit is contained in:
Rachael Alexanderson 2017-06-19 23:46:07 -04:00
parent e290274fb7
commit cc9fa8a6f5

View file

@ -94,7 +94,7 @@ int GetUIScale(int altval)
int vmax = screen->GetHeight() / 200;
int hmax = screen->GetWidth() / 320;
int max = MAX(vmax, hmax);
return MIN(scaleval, max);
return MAX(1,MIN(scaleval, max));
}
// [RH] Stretch values to make a 320x200 image best fit the screen