From 896cc6a375f8205612d98947384c578dffc32f84 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 16 Feb 2014 15:36:01 +0100 Subject: [PATCH] (PSP) Implement autodetect_enable --- driver.h | 2 ++ psp/psp_input.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/driver.h b/driver.h index 91da00c230..d655a9595e 100644 --- a/driver.h +++ b/driver.h @@ -306,6 +306,8 @@ enum input_devices DEVICE_XBOX_PAD = 0, #elif defined(__CELLOS_LV2__) DEVICE_SIXAXIS = 0, +#elif defined(PSP) + DEVICE_PSP = 0, #elif defined(__BLACKBERRY_QNX__) DEVICE_NONE, DEVICE_WIIMOTE, diff --git a/psp/psp_input.c b/psp/psp_input.c index 8d684380ed..d526aac3bf 100644 --- a/psp/psp_input.c +++ b/psp/psp_input.c @@ -120,6 +120,11 @@ static void psp_input_poll(void *data) psp->pad_state |= (STATE_ANALOGRY(state_tmp) > ANALOGSTICK_DEADZONE_HIGH) ? PSP_GAMEPAD_RSTICK_DOWN_MASK : 0; #endif #endif + if (g_settings.input.autodetect_enable) + { + if (strcmp(g_settings.input.device_names[port], "PSP") != 0) + psp_input_set_keybinds(NULL, DEVICE_PSP, port, 0, (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BINDS)); + } } static bool psp_menu_input_state(uint64_t joykey, uint64_t state)