From 9748fdf37173c56ba5b4e0c6cf5b3e0d253fcdf4 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 30 Oct 2018 18:42:48 +0000 Subject: [PATCH] Fix check_mouse_area_for_getpixel_new in 16BPP mode. git-svn-id: svn://kolibrios.org@7510 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/video/cursors.inc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/kernel/trunk/video/cursors.inc b/kernel/trunk/video/cursors.inc index 436ef0ecac..7b9dc48e99 100644 --- a/kernel/trunk/video/cursors.inc +++ b/kernel/trunk/video/cursors.inc @@ -1,6 +1,6 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; ;; -;; Copyright (C) KolibriOS team 2004-2015. All rights reserved. ;; +;; Copyright (C) KolibriOS team 2004-2018. All rights reserved. ;; ;; Distributed under terms of the GNU General Public License ;; ;; ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -1001,13 +1001,24 @@ check_mouse_area_for_getpixel_new: cmp byte [_display.bits_per_pixel], 24 je @f sub eax, ebx + add eax, cur_saved_data + mov ecx, [eax] + shl ecx, 3 + ror ecx, 8 + shl cx, 2 + ror ecx, 8 + shl cl, 3 + rol ecx, 16 + or ecx, 0xff000000 + pop ebx eax + ret + ;-------------------------------------- align 4 @@: add eax, cur_saved_data mov ecx, [eax] - and ecx, 0xffffff - add ecx, 0xff000000 + or ecx, 0xff000000 pop ebx eax ret ;--------------------------------------