Switch: Fix image size scaling rounding (fixes #2073)
Vicki Pfau vi@endrift.com
Tue, 23 Mar 2021 22:08:21 -0700
2 files changed,
8 insertions(+),
7 deletions(-)
M
CHANGES
→
CHANGES
@@ -108,6 +108,7 @@ - Qt: Fix loading a new game crashing on Wayland (fixes mgba.io/i/1992)
- Qt: Fix inability to clear hat bindings - SM83: Simplify register pair access on big endian - SM83: Disassemble STOP as one byte + - Switch: Fix GB game height in pixel accurate mode (fixes mgba.io/i/2073) - Wii: Fix crash on unloading irregularly sized GBA ROMs Misc: - 3DS: Use "wide mode" where applicable for slightly better filtering
M
src/platform/switch/main.c
→
src/platform/switch/main.c
@@ -359,24 +359,24 @@ float max = 1.f;
switch (screenMode) { case SM_PA: if (aspectX > aspectY) { - max = floor(1.0 / aspectX); + max = floor(1.f / aspectX); } else { - max = floor(1.0 / aspectY); + max = floor(1.f / aspectY); } - if (max >= 1.0) { + if (max >= 1.f) { break; } // Fall through case SM_AF: if (aspectX > aspectY) { - max = 1.0 / aspectX; + max = 1.f / aspectX; } else { - max = 1.0 / aspectY; + max = 1.f / aspectY; } break; case SM_SF: - aspectX = 1.0; - aspectY = 1.0; + aspectX = 1.f; + aspectY = 1.f; break; }