From c8bcafe7cb866d1af334822ed4067069812dd96a Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sun, 12 Nov 2023 22:10:44 +0100 Subject: [PATCH] nds: remove floating point usage in nds_subscreen_scaled_init --- arch/nds/render.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/nds/render.c b/arch/nds/render.c index 53e6ab247..673100832 100644 --- a/arch/nds/render.c +++ b/arch/nds/render.c @@ -141,8 +141,8 @@ static void palette_idx_table_init(void) static void nds_subscreen_scaled_init(void) { - int xscale = (int)(320.0/256.0 * 256.0); - int yscale = (int)(350.0/subscreen_height * 256.0); + int xscale = (int)(320 * 256 / 256); + int yscale = (int)(350 * 256 / subscreen_height); /* Use banks A and B for the MZX screen. */ videoSetMode(MODE_5_2D | DISPLAY_BG0_ACTIVE | DISPLAY_BG1_ACTIVE | DISPLAY_BG2_ACTIVE | DISPLAY_BG3_ACTIVE);