Skip to content
Snippets Groups Projects
Commit 66864ebe authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Save moving the "new" row

Previously, we actually moved one more line back than we had to.
This only moves lines back that need to remain where they were.

This shaves another couple seconds off the benchmark.
parent 095d3610
No related branches found
No related tags found
No related merge requests found
Pipeline #7716 passed
......@@ -1400,13 +1400,12 @@ bitmap_movetext_screen(int x, int y, int tox, int toy, int direction, int height
direction = 1;
else
direction = -1;
height = vstat.rows - height;
height = vstat.rows - (height + (y - toy));
// If everything was moved, there's no lines to move back
if (height <= y - toy)
if (height <= 0)
return;
int otoy = toy;
toy = vstat.rows - (y - toy);
y = toy - (y - otoy);
toy = vstat.rows - (height - 1);
y = toy - (height);
}
int maxpos = screena.screenwidth * screena.screenheight;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment