Create input_config_get_device_name

This commit is contained in:
twinaphex 2017-01-13 16:02:10 +01:00
parent 8b0127b122
commit 6ed4de0d79
2 changed files with 10 additions and 0 deletions

View File

@ -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();

View File

@ -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