Rename input_find_sk_key.

Matches up better with the conventions in input_common.
The sk-prefix was from SSNES days (how things linger on ... D:)
This commit is contained in:
Themaister 2014-01-08 18:23:58 +01:00
parent c786483635
commit 67e7628568
3 changed files with 6 additions and 6 deletions

View File

@ -992,7 +992,7 @@ const struct input_key_map input_config_key_map[] = {
{ NULL, RETROK_UNKNOWN },
};
static enum retro_key find_sk_bind(const char *str)
static enum retro_key find_rk_bind(const char *str)
{
size_t i;
for (i = 0; input_config_key_map[i].str; i++)
@ -1005,12 +1005,12 @@ static enum retro_key find_sk_bind(const char *str)
return RETROK_UNKNOWN;
}
enum retro_key input_find_sk_key(const char *str)
enum retro_key input_translate_str_to_rk(const char *str)
{
if (strlen(str) == 1 && isalpha(*str))
return (enum retro_key)(RETROK_a + (tolower(*str) - (int)'a'));
else
return find_sk_bind(str);
return find_rk_bind(str);
}
void input_config_parse_key(config_file_t *conf, const char *prefix, const char *btn,
@ -1021,7 +1021,7 @@ void input_config_parse_key(config_file_t *conf, const char *prefix, const char
snprintf(key, sizeof(key), "%s_%s", prefix, btn);
if (config_get_array(conf, key, tmp, sizeof(tmp)))
bind->key = input_find_sk_key(tmp);
bind->key = input_translate_str_to_rk(tmp);
}
const char *input_config_get_prefix(unsigned player, bool meta)

View File

@ -150,12 +150,12 @@ struct input_key_map
};
extern const struct input_key_map input_config_key_map[];
void input_translate_rk_to_str(enum retro_key key, char *buf, size_t size);
enum retro_key input_translate_str_to_rk(const char *str);
extern const char* const input_builtin_autoconfs[];
const char *input_config_get_prefix(unsigned player, bool meta);
unsigned input_translate_str_to_bind_id(const char *str); // Returns RARCH_BIND_LIST_END on not found.
enum retro_key input_find_sk_key(const char *str);
void input_config_parse_key(config_file_t *conf, const char *prefix, const char *btn,

View File

@ -249,7 +249,7 @@ static bool input_overlay_load_desc(input_overlay_t *ol, config_file_t *conf, st
else if (strstr(key, "retrok_") == key)
{
desc->type = OVERLAY_TYPE_KEYBOARD;
desc->key_mask = input_find_sk_key(key + 7);
desc->key_mask = input_translate_str_to_rk(key + 7);
}
else
{