Skip to content
Permalink
Browse files

Wrong check for minimum mouse position

  • Loading branch information
pmandin committed Aug 10, 2004
1 parent 154ff24 commit 7aa786527ff4705bcf191558f29ebf2e6acfb069

File 1 of 1 in 7aa7865

@@ -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);

0 comments on commit 7aa7865

Please sign in to comment.