Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added missing X1/X2 button support
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 25, 2008
1 parent b60dfec commit 58d33af
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/video/win32/SDL_win32events.c
Expand Up @@ -271,6 +271,16 @@ WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
} else if (flags & RI_MOUSE_BUTTON_3_UP) {
SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_RIGHT);
}
if (flags & RI_MOUSE_BUTTON_4_DOWN) {
SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X1);
} else if (flags & RI_MOUSE_BUTTON_4_UP) {
SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X1);
}
if (flags & RI_MOUSE_BUTTON_5_DOWN) {
SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X2);
} else if (flags & RI_MOUSE_BUTTON_5_UP) {
SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X2);
}
if (flags & RI_MOUSE_WHEEL) {
if (raw->data.mouse.usButtonData != 0) {
SDL_SendMouseWheel(index, 0,
Expand Down

0 comments on commit 58d33af

Please sign in to comment.