From 38805da889c6d903556b747817e1ed434dbb68ff Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 27 Aug 2020 16:52:12 +0200 Subject: [PATCH] Use config_get_entry instead of config_get_array --- retroarch.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/retroarch.c b/retroarch.c index 892bf7cb1c..b528e9e15e 100644 --- a/retroarch.c +++ b/retroarch.c @@ -27397,15 +27397,18 @@ static void input_config_parse_key( const char *prefix, const char *btn, struct retro_keybind *bind) { - char tmp[64]; char key[64]; + struct config_entry_list *entry = NULL; - tmp[0] = key[0] = '\0'; + key[0] = '\0'; fill_pathname_join_delim(key, prefix, btn, '_', sizeof(key)); - if (config_get_array(conf, key, tmp, sizeof(tmp))) - bind->key = input_config_translate_str_to_rk(tmp); + if ( + (entry = config_get_entry(conf, key)) + && (!string_is_empty(entry->value)) + ) + bind->key = input_config_translate_str_to_rk(entry->value); } static const char *input_config_get_prefix(unsigned user, bool meta)