(PSP) Implement autodetect_enable

This commit is contained in:
twinaphex 2014-02-16 15:36:01 +01:00
parent 9e295eccd4
commit 896cc6a375
2 changed files with 7 additions and 0 deletions

View File

@ -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,

View File

@ -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)