mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-08 19:40:30 +00:00
Don't try to save autoconfig profile if device name is empty
This commit is contained in:
parent
03818dc780
commit
095c97d053
@ -1314,6 +1314,7 @@ static int setting_action_ok_bind_all_save_autoconfig(void *data, bool wraparoun
|
||||
unsigned index_offset;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
const char *name = NULL;
|
||||
|
||||
(void)wraparound;
|
||||
|
||||
@ -1321,9 +1322,9 @@ static int setting_action_ok_bind_all_save_autoconfig(void *data, bool wraparoun
|
||||
return -1;
|
||||
|
||||
index_offset = setting->index_offset;
|
||||
name = settings->input.device_names[index_offset];
|
||||
|
||||
if(config_save_autoconf_profile(
|
||||
settings->input.device_names[index_offset], index_offset))
|
||||
if(!string_is_empty(name) && config_save_autoconf_profile(name, index_offset))
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY), 1, 100, true);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user