Mercurial > sdl-ios-xcode
diff src/video/bwindow/SDL_sysmouse.cc @ 4012:4e29535b821b SDL-1.2
Fixed bug #360
Fixed fullscreen video modes and improved the mouse grab code.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sat, 07 Jul 2007 19:20:28 +0000 |
parents | c82c1870c77a |
children | a1b03ba2fcd0 |
line wrap: on
line diff
--- a/src/video/bwindow/SDL_sysmouse.cc Fri Jul 06 13:39:03 2007 +0000 +++ b/src/video/bwindow/SDL_sysmouse.cc Sat Jul 07 19:20:28 2007 +0000 @@ -128,15 +128,14 @@ /* Implementation by Christian Bauer <cbauer@student.physik.uni-mainz.de> */ void BE_WarpWMCursor(_THIS, Uint16 x, Uint16 y) { - if (_this->screen && (_this->screen->flags & SDL_FULLSCREEN)) { - SDL_PrivateMouseMotion(0, 0, x, y); - } else { - BPoint pt(x, y); - SDL_Win->Lock(); - SDL_Win->ConvertToScreen(&pt); - SDL_Win->Unlock(); - set_mouse_position((int32)pt.x, (int32)pt.y); - } + BPoint pt; + SDL_Win->GetXYOffset(pt.x, pt.y); + pt.x += x; + pt.y += y; + SDL_Win->Lock(); + SDL_Win->ConvertToScreen(&pt); + SDL_Win->Unlock(); + set_mouse_position((int32)pt.x, (int32)pt.y); } /* Check to see if we need to enter or leave mouse relative mode */