src/video/android/SDL_androidmouse.c
changeset 10049 0052384f717f
parent 9998 f67cf37e9cd4
child 10051 2c6c612344b5
     1.1 --- a/src/video/android/SDL_androidmouse.c	Sat Jan 09 17:41:09 2016 -0400
     1.2 +++ b/src/video/android/SDL_androidmouse.c	Mon Jan 11 20:02:48 2016 +0100
     1.3 @@ -37,6 +37,8 @@
     1.4  #define BUTTON_PRIMARY 1
     1.5  #define BUTTON_SECONDARY 2
     1.6  #define BUTTON_TERTIARY 4
     1.7 +#define BUTTON_BACK 8
     1.8 +#define BUTTON_FORWARD 16
     1.9  
    1.10  void Android_OnMouse( int androidButton, int action, float x, float y) {
    1.11      static Uint8 SDLButton;
    1.12 @@ -53,6 +55,10 @@
    1.13                  SDLButton = SDL_BUTTON_RIGHT;
    1.14              } else if (androidButton == BUTTON_TERTIARY) {
    1.15                  SDLButton = SDL_BUTTON_MIDDLE;
    1.16 +            } else if (androidButton == BUTTON_FORWARD) {
    1.17 +                SDLButton = SDL_BUTTON_X1;
    1.18 +            } else if (androidButton == BUTTON_BACK) {
    1.19 +                SDLButton = SDL_BUTTON_X2;
    1.20              }
    1.21              SDL_SendMouseMotion(Android_Window, 0, 0, x, y);
    1.22              SDL_SendMouseButton(Android_Window, 0, SDL_PRESSED, SDLButton);