diff src/video/wincommon/SDL_sysmouse.c @ 527:5c74ac147358

Fixed mouse warp position bug with offset video modes
author Sam Lantinga <slouken@libsdl.org>
date Fri, 11 Oct 2002 08:09:26 +0000
parents f097dba83975
children 86d0d01290ea
line wrap: on
line diff
--- a/src/video/wincommon/SDL_sysmouse.c	Fri Oct 11 07:56:36 2002 +0000
+++ b/src/video/wincommon/SDL_sysmouse.c	Fri Oct 11 08:09:26 2002 +0000
@@ -213,12 +213,7 @@
 
 void WIN_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
 {
-	POINT pt;
-
 	if ( DDRAW_FULLSCREEN() ) {
-		x += (this->screen->offset % this->screen->pitch) /
-		      this->screen->format->BytesPerPixel;
-		y += (this->screen->offset / this->screen->pitch);
 		SDL_PrivateMouseMotion(0, 0, x, y);
 	} else if ( mouse_relative) {
 		/*	RJR: March 28, 2000
@@ -226,6 +221,7 @@
 			mouse hidden and grabbed */
 		SDL_PrivateMouseMotion(0, 0, x, y);
 	} else {
+		POINT pt;
 		pt.x = x;
 		pt.y = y;
 		ClientToScreen(SDL_Window, &pt);