# HG changeset patch # User Patrice Mandin # Date 1138221381 0 # Node ID fdc7ef6ecab4216914c23e006dd9c079f1d552bd # Parent a7bea6db3c3e451ac504a3f9b3f9fb6f932d87a8 Correctly manage mouse relative motion diff -r a7bea6db3c3e -r fdc7ef6ecab4 src/video/gem/SDL_gemevents.c --- a/src/video/gem/SDL_gemevents.c Wed Jan 25 18:11:56 2006 +0000 +++ b/src/video/gem/SDL_gemevents.c Wed Jan 25 20:36:21 2006 +0000 @@ -382,13 +382,13 @@ } /* Mouse motion ? */ - if ((prevmousex!=mx) || (prevmousey!=my)) { - if (GEM_mouse_relative) { - if ((SDL_AtariXbios_mousex!=0) || (SDL_AtariXbios_mousey!=0)) { - SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey); - SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0; - } - } else { + if (GEM_mouse_relative) { + if (SDL_AtariXbios_mousex || SDL_AtariXbios_mousey) { + SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey); + SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0; + } + } else { + if ((prevmousex!=mx) || (prevmousey!=my)) { int posx, posy; /* Give mouse position relative to window position */ diff -r a7bea6db3c3e -r fdc7ef6ecab4 src/video/gem/SDL_gemmouse.c --- a/src/video/gem/SDL_gemmouse.c Wed Jan 25 18:11:56 2006 +0000 +++ b/src/video/gem/SDL_gemmouse.c Wed Jan 25 20:36:21 2006 +0000 @@ -165,8 +165,8 @@ void GEM_CheckMouseMode(_THIS) { /* If the mouse is hidden and input is grabbed, we use relative mode */ - if ( !(SDL_cursorstate & CURSOR_VISIBLE) && - (this->input_grab != SDL_GRAB_OFF) && + if ( (!(SDL_cursorstate & CURSOR_VISIBLE)) && + /*(this->input_grab != SDL_GRAB_OFF) && */ /* Damn GEM can not grab */ (SDL_GetAppState() & SDL_APPACTIVE) ) { GEM_mouse_relative = SDL_TRUE; } else {