From 26b4dc79d011fa0bb1574bf51991c6345d82269d Mon Sep 17 00:00:00 2001 From: Toad King Date: Thu, 2 Jul 2015 23:06:53 -0500 Subject: [PATCH] [Android] clear bindings on context reset, they end up getting rebound anyway bump version --- android/phoenix/AndroidManifest.xml | 2 +- input/drivers/android_input.c | 6 +++--- input/drivers_joypad/android_joypad.c | 17 +---------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/android/phoenix/AndroidManifest.xml b/android/phoenix/AndroidManifest.xml index cf69b2ab99..b528d90cab 100644 --- a/android/phoenix/AndroidManifest.xml +++ b/android/phoenix/AndroidManifest.xml @@ -1,7 +1,7 @@ + android:versionName="1.2" android:installLocation="preferExternal"> pad_states[*port].name, name_buf, sizeof(android->pad_states[*port].name)); - if (!autoconfigured) - { + if (autoconfigured && strcmp(name_buf, "RetroKeyboard")) + settings->input.binds[*port][RARCH_MENU_TOGGLE].joykey = 0; + else settings->input.binds[*port][RARCH_MENU_TOGGLE].joykey = AKEYCODE_BACK; - } android->pads_connected++; } diff --git a/input/drivers_joypad/android_joypad.c b/input/drivers_joypad/android_joypad.c index 5c2618bc2e..68203c9467 100644 --- a/input/drivers_joypad/android_joypad.c +++ b/input/drivers_joypad/android_joypad.c @@ -26,26 +26,11 @@ static bool android_joypad_init(void *data) { unsigned autoconf_pad; settings_t *settings = config_get_ptr(); - autoconfig_params_t params = {{0}}; (void)data; for (autoconf_pad = 0; autoconf_pad < MAX_USERS; autoconf_pad++) - { - strlcpy(settings->input.device_names[autoconf_pad], - android_joypad_name(autoconf_pad), - sizeof(settings->input.device_names[autoconf_pad])); - - /* TODO - implement VID/PID? */ - params.idx = autoconf_pad; - strlcpy(params.name, android_joypad_name(autoconf_pad), sizeof(params.name)); - strlcpy(params.driver, android_joypad.ident, sizeof(params.driver)); - - if (!input_config_autoconfigure_joypad(¶ms)) - { - settings->input.binds[autoconf_pad][RARCH_MENU_TOGGLE].joykey = AKEYCODE_BACK; - } - } + settings->input.binds[autoconf_pad][RARCH_MENU_TOGGLE].joykey = AKEYCODE_BACK; engine_handle_dpad = engine_handle_dpad_default; if ((dlopen("/system/lib/libandroid.so", RTLD_LOCAL | RTLD_LAZY)) == 0)