+static const struct in_default_bind in_sdl_defbinds[] = {
+ { SDLK_UP, IN_BINDTYPE_PLAYER12, DKEY_UP },
+ { SDLK_DOWN, IN_BINDTYPE_PLAYER12, DKEY_DOWN },
+ { SDLK_LEFT, IN_BINDTYPE_PLAYER12, DKEY_LEFT },
+ { SDLK_RIGHT, IN_BINDTYPE_PLAYER12, DKEY_RIGHT },
+ { SDLK_d, IN_BINDTYPE_PLAYER12, DKEY_TRIANGLE },
+ { SDLK_z, IN_BINDTYPE_PLAYER12, DKEY_CROSS },
+ { SDLK_x, IN_BINDTYPE_PLAYER12, DKEY_CIRCLE },
+ { SDLK_s, IN_BINDTYPE_PLAYER12, DKEY_SQUARE },
+ { SDLK_v, IN_BINDTYPE_PLAYER12, DKEY_START },
+ { SDLK_c, IN_BINDTYPE_PLAYER12, DKEY_SELECT },
+ { SDLK_w, IN_BINDTYPE_PLAYER12, DKEY_L1 },
+ { SDLK_r, IN_BINDTYPE_PLAYER12, DKEY_R1 },
+ { SDLK_e, IN_BINDTYPE_PLAYER12, DKEY_L2 },
+ { SDLK_t, IN_BINDTYPE_PLAYER12, DKEY_R2 },
+ { SDLK_ESCAPE, IN_BINDTYPE_EMU, SACTION_ENTER_MENU },
+ { SDLK_F1, IN_BINDTYPE_EMU, SACTION_SAVE_STATE },
+ { SDLK_F2, IN_BINDTYPE_EMU, SACTION_LOAD_STATE },
+ { SDLK_F3, IN_BINDTYPE_EMU, SACTION_PREV_SSLOT },
+ { SDLK_F4, IN_BINDTYPE_EMU, SACTION_NEXT_SSLOT },
+ { SDLK_F5, IN_BINDTYPE_EMU, SACTION_TOGGLE_FSKIP },
+ { SDLK_F6, IN_BINDTYPE_EMU, SACTION_SCREENSHOT },
+ { SDLK_F7, IN_BINDTYPE_EMU, SACTION_TOGGLE_FPS },
+ { SDLK_F8, IN_BINDTYPE_EMU, SACTION_SWITCH_DISPMODE },
+ { SDLK_F11, IN_BINDTYPE_EMU, SACTION_TOGGLE_FULLSCREEN },
+ { SDLK_BACKSPACE, IN_BINDTYPE_EMU, SACTION_FAST_FORWARD },
+ { 0, 0, 0 }
+};
+
+const struct menu_keymap in_sdl_key_map[] =
+{
+ { SDLK_UP, PBTN_UP },
+ { SDLK_DOWN, PBTN_DOWN },
+ { SDLK_LEFT, PBTN_LEFT },
+ { SDLK_RIGHT, PBTN_RIGHT },
+ { SDLK_RETURN, PBTN_MOK },
+ { SDLK_ESCAPE, PBTN_MBACK },
+ { SDLK_SEMICOLON, PBTN_MA2 },
+ { SDLK_QUOTE, PBTN_MA3 },
+ { SDLK_LEFTBRACKET, PBTN_L },
+ { SDLK_RIGHTBRACKET, PBTN_R },
+};
+
+const struct menu_keymap in_sdl_joy_map[] =
+{
+ { SDLK_UP, PBTN_UP },
+ { SDLK_DOWN, PBTN_DOWN },
+ { SDLK_LEFT, PBTN_LEFT },
+ { SDLK_RIGHT, PBTN_RIGHT },
+ /* joystick */
+ { SDLK_WORLD_0, PBTN_MOK },
+ { SDLK_WORLD_1, PBTN_MBACK },
+ { SDLK_WORLD_2, PBTN_MA2 },
+ { SDLK_WORLD_3, PBTN_MA3 },
+};
+
+static const struct in_pdata in_sdl_platform_data = {
+ .defbinds = in_sdl_defbinds,
+ .key_map = in_sdl_key_map,
+ .kmap_size = sizeof(in_sdl_key_map) / sizeof(in_sdl_key_map[0]),
+ .joy_map = in_sdl_joy_map,
+ .jmap_size = sizeof(in_sdl_joy_map) / sizeof(in_sdl_joy_map[0]),