Wrong check for minimum mouse position

This commit is contained in:
Patrice Mandin
2004-08-10 18:59:58 +00:00
parent e8dbeda86d
commit 1dd936f4e8

View File

@@ -321,10 +321,10 @@ static void do_mouse(_THIS, short mx, short my, short mb, short ks)
/* Give mouse position relative to window position */
posx = mx - x2;
if (posx<0) posx = x2;
if (posx<0) posx = 0;
if (posx>w2) posx = w2-1;
posy = my - y2;
if (posy<0) posy = y2;
if (posy<0) posy = 0;
if (posy>h2) posy = h2-1;
SDL_PrivateMouseMotion(0, 0, posx, posy);