comparison src/video/gem/SDL_gemevents.c @ 927:c5689bd09eaa

Wrong check for minimum mouse position
author Patrice Mandin <patmandin@gmail.com>
date Tue, 10 Aug 2004 18:59:58 +0000
parents 83db694556eb
children 6c87754f324c
comparison
equal deleted inserted replaced
926:83db694556eb 927:c5689bd09eaa
319 } else { 319 } else {
320 int posx, posy; 320 int posx, posy;
321 321
322 /* Give mouse position relative to window position */ 322 /* Give mouse position relative to window position */
323 posx = mx - x2; 323 posx = mx - x2;
324 if (posx<0) posx = x2; 324 if (posx<0) posx = 0;
325 if (posx>w2) posx = w2-1; 325 if (posx>w2) posx = w2-1;
326 posy = my - y2; 326 posy = my - y2;
327 if (posy<0) posy = y2; 327 if (posy<0) posy = 0;
328 if (posy>h2) posy = h2-1; 328 if (posy>h2) posy = h2-1;
329 329
330 SDL_PrivateMouseMotion(0, 0, posx, posy); 330 SDL_PrivateMouseMotion(0, 0, posx, posy);
331 } 331 }
332 prevmousex = mx; 332 prevmousex = mx;