diff --git a/input/input_config.c b/input/input_config.c index c6906d9bc0..093c37debd 100644 --- a/input/input_config.c +++ b/input/input_config.c @@ -476,6 +476,14 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind, #endif } +const char *input_config_get_device_name(unsigned port) +{ + settings_t *settings = config_get_ptr(); + if (string_is_empty(settings->input.device_names[port])) + return NULL; + return settings->input.device_names[port]; +} + void input_config_set_device_name(unsigned port, const char *name) { settings_t *settings = config_get_ptr(); diff --git a/input/input_config.h b/input/input_config.h index 3cba6131d1..f21997e9fd 100644 --- a/input/input_config.h +++ b/input/input_config.h @@ -69,6 +69,8 @@ void input_config_parse_joy_axis(void *data, const char *prefix, void input_config_set_device_name(unsigned port, const char *name); +const char *input_config_get_device_name(unsigned port); + const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned id); #endif