src/joystick/emscripten/SDL_sysjoystick_c.h
changeset 9304 e64d9374f1be
parent 9278 8900afb78a19
child 9343 7f58a328445c
equal deleted inserted replaced
9303:b7873b036fe7 9304:e64d9374f1be
    25 #include "../SDL_sysjoystick.h"
    25 #include "../SDL_sysjoystick.h"
    26 
    26 
    27 
    27 
    28 #include <emscripten/html5.h>
    28 #include <emscripten/html5.h>
    29 
    29 
    30 typedef enum
       
    31 {
       
    32     EMSCRIPTEN_CONTROLLER_BUTTON_INVALID = -1,
       
    33     EMSCRIPTEN_CONTROLLER_BUTTON_A,
       
    34     EMSCRIPTEN_CONTROLLER_BUTTON_B,
       
    35     EMSCRIPTEN_CONTROLLER_BUTTON_X,
       
    36     EMSCRIPTEN_CONTROLLER_BUTTON_Y,
       
    37     EMSCRIPTEN_CONTROLLER_BUTTON_L1,
       
    38     EMSCRIPTEN_CONTROLLER_BUTTON_R1,
       
    39     EMSCRIPTEN_CONTROLLER_BUTTON_L2,
       
    40     EMSCRIPTEN_CONTROLLER_BUTTON_R2,
       
    41     EMSCRIPTEN_CONTROLLER_BUTTON_BACK,
       
    42     EMSCRIPTEN_CONTROLLER_BUTTON_START,
       
    43     EMSCRIPTEN_CONTROLLER_BUTTON_LEFTSTICK,
       
    44     EMSCRIPTEN_CONTROLLER_BUTTON_RIGHTSTICK,
       
    45     EMSCRIPTEN_CONTROLLER_DPAD_UP,
       
    46     EMSCRIPTEN_CONTROLLER_DPAD_DOWN,
       
    47     EMSCRIPTEN_CONTROLLER_DPAD_LEFT,
       
    48     EMSCRIPTEN_CONTROLLER_DPAD_RIGHT,
       
    49     EMSCRIPTEN_CONTROLLER_BUTTON_GUIDE,
       
    50 } Emscripten_GameControllerButton;
       
    51 
       
    52 static int EMSCRIPTEN_MAX_NBUTTONS = 18;
       
    53 
       
    54 /* A linked list of available joysticks */
    30 /* A linked list of available joysticks */
    55 typedef struct SDL_joylist_item
    31 typedef struct SDL_joylist_item
    56 {
    32 {
    57   int index;
    33   int index;
    58   char *name;
    34   char *name;