comparison src/video/gem/SDL_gemevents.c @ 1267:fdc7ef6ecab4

Correctly manage mouse relative motion
author Patrice Mandin <patmandin@gmail.com>
date Wed, 25 Jan 2006 20:36:21 +0000
parents a8068adf156b
children a201a8c62522
comparison
equal deleted inserted replaced
1266:a7bea6db3c3e 1267:fdc7ef6ecab4
380 mb=prevmouseb; 380 mb=prevmouseb;
381 } 381 }
382 } 382 }
383 383
384 /* Mouse motion ? */ 384 /* Mouse motion ? */
385 if ((prevmousex!=mx) || (prevmousey!=my)) { 385 if (GEM_mouse_relative) {
386 if (GEM_mouse_relative) { 386 if (SDL_AtariXbios_mousex || SDL_AtariXbios_mousey) {
387 if ((SDL_AtariXbios_mousex!=0) || (SDL_AtariXbios_mousey!=0)) { 387 SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey);
388 SDL_PrivateMouseMotion(0, 1, SDL_AtariXbios_mousex, SDL_AtariXbios_mousey); 388 SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0;
389 SDL_AtariXbios_mousex = SDL_AtariXbios_mousey = 0; 389 }
390 } 390 } else {
391 } else { 391 if ((prevmousex!=mx) || (prevmousey!=my)) {
392 int posx, posy; 392 int posx, posy;
393 393
394 /* Give mouse position relative to window position */ 394 /* Give mouse position relative to window position */
395 posx = mx - x2; 395 posx = mx - x2;
396 if (posx<0) posx = 0; 396 if (posx<0) posx = 0;