From f4df788d114a8c651c568214bf458b81404e7621 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juhani=20Krekel=C3=A4?= Date: Thu, 23 Mar 2023 12:28:42 +0200 Subject: [PATCH] Reduce flickering while moving windows --- shell.asm | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/shell.asm b/shell.asm index ec413bc..76f6b22 100644 --- a/shell.asm +++ b/shell.asm @@ -297,16 +297,24 @@ resize: ; si = pointer to window structure move: push dx - mov [si + window.y], bx - mov [si + window.x], cx - mov dx, [si + window.res_x] - sub [si + window.x], dx + mov dx, cx + sub dx, [si + window.res_x] - .not_underflow: + cmp [si + window.y], bx + jne .change + cmp [si + window.x], dx + jne .change + jmp .end + + .change + mov [si + window.y], bx + mov [si + window.x], dx + + call request_redraw + + .end: pop dx - - call request_redraw ret ; in: