X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=gp2x%2Fin_gp2x.c;h=37abeaf17824fd889a5b02a7238de775b07e3feb;hb=61d87c7eddb013b1ca1275ffc2c2e3a51d5136a7;hp=273c03be6c927e6436adea7753f8ccab73ebc830;hpb=b79118011b8b1ac835efed1ac5a9ce3bdc55c158;p=libpicofe.git diff --git a/gp2x/in_gp2x.c b/gp2x/in_gp2x.c index 273c03b..37abeaf 100644 --- a/gp2x/in_gp2x.c +++ b/gp2x/in_gp2x.c @@ -27,7 +27,7 @@ enum { BTN_UP = 0, BTN_LEFT = 2, BTN_DOWN = 4, BTN_RIGHT = 6, BTN_VOL_UP = 23, BTN_VOL_DOWN = 22, BTN_PUSH = 27 }; static const char * const in_gp2x_prefix = IN_PREFIX; -static const char * const in_gp2x_keys[IN_GP2X_NBUTTONS] = { +static const char *in_gp2x_keys[IN_GP2X_NBUTTONS] = { [0 ... IN_GP2X_NBUTTONS-1] = NULL, [BTN_UP] = "UP", [BTN_LEFT] = "LEFT", [BTN_DOWN] = "DOWN", [BTN_RIGHT] = "RIGHT", [BTN_START] = "START", [BTN_SELECT] = "SELECT", [BTN_L] = "L", [BTN_R] = "R", @@ -55,8 +55,8 @@ static int in_gp2x_get_mmsp2_bits(void) static int in_gp2x_get_wiz_bits(void) { - int value = 0; - read(gpiodev, &value, 4); + int r, value = 0; + r = read(gpiodev, &value, 4); if (value & 0x02) value |= 0x05; if (value & 0x08) @@ -317,7 +317,12 @@ static int in_gp2x_clean_binds(void *drv_data, int *binds, int *def_binds) void in_gp2x_init(void *vdrv) { in_drv_t *drv = vdrv; + gp2x_soc_t soc; + soc = soc_detect(); + if (soc == SOCID_POLLUX) + in_gp2x_keys[BTN_START] = "MENU"; + in_gp2x_combo_keys = in_gp2x_combo_acts = 0; drv->prefix = in_gp2x_prefix;