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

Move assignments for things only needed in the loop inside the loop

parent f8f00d18
No related branches found
No related tags found
No related merge requests found
......@@ -402,6 +402,7 @@ static void cb_drawrect(struct rectlist *data)
* 5) When blinking, the cursor is shown when vstat.blink is true.
*/
assert_rwlock_rdlock(&vstatlock);
if (cursor_visible_locked()) {
if (vstat.mode == PRESTEL_40X24)
cv = 0x80FFFFFF;
else
......@@ -412,7 +413,6 @@ static void cb_drawrect(struct rectlist *data)
curs_col = vstat.curs_col;
charheight = vstat.charheight;
charwidth = vstat.charwidth;
if (cursor_visible_locked()) {
assert_rwlock_unlock(&vstatlock);
for (y = curs_start; y <= curs_end; y++) {
pixel = &data->data[((curs_row - 1) * charheight + y) * data->rect.width + (curs_col - 1) * charwidth];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment