Skip to content
Permalink
Browse files

Mouse wheel fix patch.

  • Loading branch information
slouken committed Apr 8, 2002
1 parent 92ba4d5 commit 02a30bbc53b14c154f9c26e3b6f183844127516c
Showing with 8 additions and 4 deletions.
  1. +2 −0 src/video/wincommon/SDL_sysevents.c
  2. +6 −4 src/video/windx5/SDL_dx5events.c
@@ -370,6 +370,8 @@ LONG CALLBACK WinMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
button = 5;
posted = SDL_PrivateMouseButton(
SDL_PRESSED, button, 0, 0);
posted |= SDL_PrivateMouseButton(
SDL_RELEASED, button, 0, 0);
}
}
return(0);
@@ -392,11 +392,13 @@ static void handle_mouse(const int numevents, DIDEVICEOBJECTDATA *ptrbuf)
yrel = 0;
}
if((int)ptrbuf[i].dwData > 0)
button = 4;
else
button = 5;
posted = SDL_PrivateMouseButton(
SDL_PRESSED, 4, 0, 0);
else if((int)ptrbuf[i].dwData < 0)
posted = SDL_PrivateMouseButton(
SDL_PRESSED, 5, 0, 0);
SDL_PRESSED, button, 0, 0);
posted |= SDL_PrivateMouseButton(
SDL_RELEASED, button, 0, 0);
break;
case DIMOFS_BUTTON0:
case DIMOFS_BUTTON1:

0 comments on commit 02a30bb

Please sign in to comment.