Skip to content

Commit

Permalink
nds: remove floating point usage in nds_subscreen_scaled_init
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka committed Nov 12, 2023
1 parent 1a63c9b commit c8bcafe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/nds/render.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit c8bcafe

Please sign in to comment.