diff --git a/CHANGES b/CHANGES index e46816bc6..414808d3d 100644 --- a/CHANGES +++ b/CHANGES @@ -108,6 +108,7 @@ Other fixes: - 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 diff --git a/src/platform/switch/main.c b/src/platform/switch/main.c index 01271bf15..9c300eab1 100644 --- a/src/platform/switch/main.c +++ b/src/platform/switch/main.c @@ -359,24 +359,24 @@ static void _drawTex(struct mGUIRunner* runner, unsigned width, unsigned height, 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; }