From 837396cc218f4fedf8408fd0621f072ec210e308 Mon Sep 17 00:00:00 2001 From: Peter Veenstra Date: Thu, 8 Dec 2011 12:59:51 +0000 Subject: [PATCH] apply granularity only for stuff reported to the clientmou Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3765 --- src/ints/mouse.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ints/mouse.cpp b/src/ints/mouse.cpp index 21cd651f..c74613c2 100644 --- a/src/ints/mouse.cpp +++ b/src/ints/mouse.cpp @@ -50,8 +50,8 @@ struct button_event { #define QUEUE_SIZE 32 #define MOUSE_BUTTONS 3 #define MOUSE_IRQ 12 -#define POS_X ((Bit16s)(mouse.x) & mouse.gran_x) -#define POS_Y ((Bit16s)(mouse.y) & mouse.gran_y) +#define POS_X (static_cast(mouse.x) & mouse.gran_x) +#define POS_Y (static_cast(mouse.y) & mouse.gran_y) #define CURSORX 16 #define CURSORY 16 @@ -1012,7 +1012,7 @@ static Bitu INT74_Handler(void) { } else if (useps2callback) { CPU_Push16(RealSeg(CALLBACK_RealPointer(int74_ret_callback))); CPU_Push16(RealOff(CALLBACK_RealPointer(int74_ret_callback))); - DoPS2Callback(mouse.event_queue[mouse.events].buttons, POS_X, POS_Y); + DoPS2Callback(mouse.event_queue[mouse.events].buttons, static_cast(mouse.x), static_cast(mouse.y)); } else { SegSet16(cs, RealSeg(CALLBACK_RealPointer(int74_ret_callback))); reg_ip = RealOff(CALLBACK_RealPointer(int74_ret_callback));