5#if !defined(_3DS) && !defined(_3DS_MOCK) 
    7typedef SDL_Keycode CST_Keycode;
 
    9typedef int CST_Keycode;
 
   12typedef uint16_t CST_Keymod;
 
   17#define TOTAL_BUTTONS 18 
   20#define LEFT_BUTTON       0b00000000000001 
   21#define RIGHT_BUTTON      0b00000000000010 
   22#define UP_BUTTON         0b00000000000100 
   23#define DOWN_BUTTON       0b00000000001000 
   24#define START_BUTTON      0b00000000010000 
   25#define B_BUTTON          0b00000000100000 
   26#define A_BUTTON          0b00000001000000 
   27#define ZL_BUTTON         0b00000010000000 
   28#define SELECT_BUTTON     0b00000100000000 
   29#define L_BUTTON          0b00001000000000 
   30#define R_BUTTON          0b00010000000000 
   31#define X_BUTTON          0b00100000000000 
   32#define Y_BUTTON          0b01000000000000 
   33#define ZR_BUTTON         0b10000000000000 
   37#define SDL_A        SDL_CONTROLLER_BUTTON_A 
   38#define SDL_B        SDL_CONTROLLER_BUTTON_B 
   39#define SDL_X        SDL_CONTROLLER_BUTTON_X 
   40#define SDL_Y        SDL_CONTROLLER_BUTTON_Y 
   42#define SDL_PLUS     SDL_CONTROLLER_BUTTON_RIGHTSHOULDER 
   43#define SDL_L        SDL_CONTROLLER_BUTTON_START 
   44#define SDL_R        SDL_CONTROLLER_BUTTON_LEFTSTICK 
   45#define SDL_ZL       SDL_CONTROLLER_BUTTON_RIGHTSTICK 
   46#define SDL_ZR       SDL_CONTROLLER_BUTTON_LEFTSHOULDER 
   47#define SDL_MINUS    SDL_CONTROLLER_BUTTON_DPAD_UP 
   49#define SDL_UP        SDL_CONTROLLER_BUTTON_DPAD_LEFT 
   50#define SDL_DOWN      SDL_CONTROLLER_BUTTON_MISC1 
   51#define SDL_LEFT      SDL_CONTROLLER_BUTTON_DPAD_DOWN 
   52#define SDL_RIGHT     SDL_CONTROLLER_BUTTON_DPAD_RIGHT 
   54#define SDL_LEFT_STICK   (SDL_GameControllerButton)16 
   55#define SDL_UP_STICK     (SDL_GameControllerButton)17 
   56#define SDL_RIGHT_STICK  (SDL_GameControllerButton)18 
   57#define SDL_DOWN_STICK   (SDL_GameControllerButton)19 
   61    unsigned int* buttons;
 
   64    std::string controller_type;
 
   67    GamepadInfo(
unsigned int* buttons, std::string* names, std::string prefix, std::string controller_type)
 
   68        : buttons(buttons), names(names), prefix(prefix), controller_type(controller_type) {}
 
   70        : buttons(
nullptr), names(
nullptr), prefix(
""), controller_type(
"")
 
   81    bool held(
int buttons);
 
   82    bool pressed(
int buttons);
 
   83    bool released(
int buttons);
 
   86    bool touchIn(
int x, 
int width, 
int y, 
int height);
 
   92    bool allowTouch = 
true;
 
   93    bool isScrolling = 
false;
 
  106    bool processDirectionalButtons();
 
  107    int directionForKeycode();
 
  108    void toggleHeldButtons();
 
  113    CST_Keycode keyCode = -1;
 
  117    bool held_directions[4] = { 
false, 
false, 
false, 
false };
 
  120    int rapidFireRate = 12; 
 
  123    static bool bypassKeyEvents;
 
  125    static std::string lastGamepadKey;
 
  127    std::function<void()> quitaction = NULL; 
 
  129    float wheelScroll = 0;