From c872d57ddea155eafeef49fb1de6e861f5f10084 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 28 Jul 2015 15:59:00 +0000 Subject: [PATCH] Console library: support for scroll mice. git-svn-id: svn://kolibrios.org@5618 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../develop/libraries/console/console.asm | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/programs/develop/libraries/console/console.asm b/programs/develop/libraries/console/console.asm index 39436f48e..bda1e637e 100644 --- a/programs/develop/libraries/console/console.asm +++ b/programs/develop/libraries/console/console.asm @@ -1842,7 +1842,7 @@ con.thread_exit: con.key: mov al, 2 int 0x40 - and eax, 0xffff ; supress scancodes + and eax, 0xffff ; supress scancodes ; ah = scancode cmp ah, 0xE0 jnz @f @@ -2038,6 +2038,27 @@ con.getch: mov [con.bGetchRequested], 1 jmp con.msg_loop con.mouse: + push 37 + pop eax + push 7 + pop ebx + int 0x40 + test eax, eax + jz .no_scrollmouse + cwde + add eax, [con.wnd_ypos] + jg @f + xor eax, eax +@@: + mov ebx, [con.scr_height] + sub ebx, [con.wnd_height] + cmp eax, ebx + jb @f + mov eax, ebx +@@: + mov [con.wnd_ypos], eax + jmp con.redraw_image +.no_scrollmouse: xor eax, eax xchg eax, dword [con.bUpPressed] mov dword [con.bUpPressed_saved], eax