From 30cadccb6ef1e00d1076642e31ae32a2e22bab00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Strohh=C3=A4cker?= Date: Thu, 19 Feb 2009 10:52:53 +0000 Subject: [PATCH] can't people just remove a simple call themselves and not opening hundreds of reports for dev sources before it's finished? Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3306 --- src/ints/mouse.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/ints/mouse.cpp b/src/ints/mouse.cpp index 247c0e6b..5142143b 100644 --- a/src/ints/mouse.cpp +++ b/src/ints/mouse.cpp @@ -16,7 +16,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: mouse.cpp,v 1.76 2009-02-16 20:33:11 c2woody Exp $ */ +/* $Id: mouse.cpp,v 1.77 2009-02-19 10:52:53 c2woody Exp $ */ #include #include @@ -445,9 +445,14 @@ void Mouse_CursorMoved(float xrel,float yrel,float x,float y,bool emulate) { if (CurMode->type == M_TEXT) { mouse.x = x*CurMode->swidth; mouse.y = y*CurMode->sheight * 8 / CurMode->cheight; - } else if (abs(mouse.max_x) < 2048 || abs(mouse.max_y) < 2048 || mouse.max_x != mouse.max_y) { - mouse.x = x*mouse.max_x; - mouse.y = y*mouse.max_y; + } else if ((mouse.max_x < 2048) || (mouse.max_y < 2048) || (mouse.max_x != mouse.max_y)) { + if ((mouse.max_x > 0) && (mouse.max_y > 0)) { + mouse.x = x*mouse.max_x; + mouse.y = y*mouse.max_y; + } else { + mouse.x += xrel; + mouse.y += yrel; + } } else { // Games faking relative movement through absolute coordinates. Quite surprising that this actually works.. mouse.x += xrel; mouse.y += yrel;