From 8d0fbe53ab3cc283a9562c50959e5356a37a565e Mon Sep 17 00:00:00 2001 From: Themaister Date: Sat, 5 Jan 2013 20:06:59 +0100 Subject: [PATCH] Set some android options default explicitly. --- config.def.h | 9 +++++++++ settings.c | 7 ++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/config.def.h b/config.def.h index 15b28112c8..691ccf6e0c 100644 --- a/config.def.h +++ b/config.def.h @@ -343,6 +343,15 @@ static const float axis_threshold = 0.5; static const unsigned turbo_period = 6; static const unsigned turbo_duty_cycle = 3; +// Enable input debugging output. +static const bool input_debug_enable = false; + +#ifdef ANDROID +// Enable input auto-detection. Will attempt to autoconfigure +// gamepads, plug-and-play style. +static const bool input_autodetect_enable = true; +#endif + // Player 1 static const struct retro_keybind retro_keybinds_1[] = { // SNES button | keyboard key | js btn | js axis | diff --git a/settings.c b/settings.c index 09b85ce6e6..846a5b3cd7 100644 --- a/settings.c +++ b/settings.c @@ -232,6 +232,11 @@ void config_set_defaults(void) g_settings.input.netplay_client_swap_input = netplay_client_swap_input; g_settings.input.turbo_period = turbo_period; g_settings.input.turbo_duty_cycle = turbo_duty_cycle; + g_settings.input.debug_enable = input_debug_enable; +#ifdef ANDROID + g_settings.input.autodetect_enable = input_autodetect_enable; +#endif + for (int i = 0; i < MAX_PLAYERS; i++) g_settings.input.joypad_map[i] = i; @@ -490,10 +495,10 @@ bool config_load_file(const char *path) CONFIG_GET_INT(input.turbo_duty_cycle, "input_duty_cycle"); CONFIG_GET_PATH(input.overlay, "input_overlay"); + CONFIG_GET_BOOL(input.debug_enable, "input_debug_enable"); #ifdef ANDROID CONFIG_GET_BOOL(input.autodetect_enable, "input_autodetect_enable"); #endif - CONFIG_GET_BOOL(input.debug_enable, "input_debug_enable"); if (config_get_string(conf, "environment_variables", &g_extern.system.environment))