Added missing X1/X2 button support
authorSam Lantinga <slouken@libsdl.org>
Mon, 25 Aug 2008 06:58:34 +0000
changeset 271162e7af9b2b67
parent 2710 44e49d3fa6cf
child 2712 c4e697245676
Added missing X1/X2 button support
src/video/win32/SDL_win32events.c
     1.1 --- a/src/video/win32/SDL_win32events.c	Mon Aug 25 06:33:00 2008 +0000
     1.2 +++ b/src/video/win32/SDL_win32events.c	Mon Aug 25 06:58:34 2008 +0000
     1.3 @@ -271,6 +271,16 @@
     1.4              } else if (flags & RI_MOUSE_BUTTON_3_UP) {
     1.5                  SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_RIGHT);
     1.6              }
     1.7 +            if (flags & RI_MOUSE_BUTTON_4_DOWN) {
     1.8 +                SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X1);
     1.9 +            } else if (flags & RI_MOUSE_BUTTON_4_UP) {
    1.10 +                SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X1);
    1.11 +            }
    1.12 +            if (flags & RI_MOUSE_BUTTON_5_DOWN) {
    1.13 +                SDL_SendMouseButton(index, SDL_PRESSED, SDL_BUTTON_X2);
    1.14 +            } else if (flags & RI_MOUSE_BUTTON_5_UP) {
    1.15 +                SDL_SendMouseButton(index, SDL_RELEASED, SDL_BUTTON_X2);
    1.16 +            }
    1.17              if (flags & RI_MOUSE_WHEEL) {
    1.18                  if (raw->data.mouse.usButtonData != 0) {
    1.19                      SDL_SendMouseWheel(index, 0,