+ { GP2X_BTN_UP, IN_BINDTYPE_PLAYER12, GBTN_UP },
+ { GP2X_BTN_DOWN, IN_BINDTYPE_PLAYER12, GBTN_DOWN },
+ { GP2X_BTN_LEFT, IN_BINDTYPE_PLAYER12, GBTN_LEFT },
+ { GP2X_BTN_RIGHT, IN_BINDTYPE_PLAYER12, GBTN_RIGHT },
+ { GP2X_BTN_A, IN_BINDTYPE_PLAYER12, GBTN_A },
+ { GP2X_BTN_X, IN_BINDTYPE_PLAYER12, GBTN_B },
+ { GP2X_BTN_B, IN_BINDTYPE_PLAYER12, GBTN_C },
+ { GP2X_BTN_START, IN_BINDTYPE_PLAYER12, GBTN_START },
+ { GP2X_BTN_Y, IN_BINDTYPE_EMU, PEVB_SWITCH_RND },
+ { GP2X_BTN_L, IN_BINDTYPE_EMU, PEVB_STATE_SAVE },
+ { GP2X_BTN_R, IN_BINDTYPE_EMU, PEVB_STATE_LOAD },
+ { GP2X_BTN_VOL_DOWN, IN_BINDTYPE_EMU, PEVB_VOL_DOWN },
+ { GP2X_BTN_VOL_UP, IN_BINDTYPE_EMU, PEVB_VOL_UP },
+ { GP2X_BTN_SELECT, IN_BINDTYPE_EMU, PEVB_MENU },
+ { 0, 0, 0 }
+};
+
+static const struct menu_keymap key_pbtn_map[] =
+{
+ { KEY_UP, PBTN_UP },
+ { KEY_DOWN, PBTN_DOWN },
+ { KEY_LEFT, PBTN_LEFT },
+ { KEY_RIGHT, PBTN_RIGHT },
+ /* Caanoo */
+ { BTN_THUMB2, PBTN_MOK },
+ { BTN_THUMB, PBTN_MBACK },
+ { BTN_TRIGGER, PBTN_MA2 },
+ { BTN_TOP, PBTN_MA3 },
+ { BTN_BASE, PBTN_MENU },
+ { BTN_TOP2, PBTN_L },
+ { BTN_PINKIE, PBTN_R },
+ /* "normal" keyboards */
+ { KEY_ENTER, PBTN_MOK },
+ { KEY_ESC, PBTN_MBACK },
+ { KEY_SEMICOLON, PBTN_MA2 },
+ { KEY_APOSTROPHE, PBTN_MA3 },
+ { KEY_BACKSLASH, PBTN_MENU },
+ { KEY_LEFTBRACE, PBTN_L },
+ { KEY_RIGHTBRACE, PBTN_R },
+};
+
+static const struct in_pdata gp2x_evdev_pdata = {
+ .defbinds = in_evdev_defbinds,
+ .key_map = key_pbtn_map,
+ .kmap_size = sizeof(key_pbtn_map) / sizeof(key_pbtn_map[0]),
+};
+
+void gp2x_video_changemode(int bpp, int is_pal)
+{
+ gp2x_video_changemode_ll(bpp, is_pal);