mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
[remapping] fix saving for players other than 1
This commit is contained in:
parent
787924fc8f
commit
f41280e82c
@ -81,21 +81,12 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||
key_remap;
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char buf[64] = {0};
|
||||
snprintf(buf, sizeof(buf), "input_player%u_joypad_index", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.joypad_map[i], buf);
|
||||
|
||||
snprintf(buf, sizeof(buf), "input_player%u_analog_dpad_mode", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.analog_dpad_mode[i], buf);
|
||||
|
||||
if (!global->has_set.libretro_device[i])
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "input_libretro_device_p%u", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.libretro_device[i], buf);
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "input_player%u_joypad_index", i + 1);
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.joypad_map[i], buf);
|
||||
|
||||
@ -108,7 +99,6 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.libretro_device[i], buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config_file_free(conf);
|
||||
|
||||
@ -179,15 +169,12 @@ bool input_remapping_save_file(const char *path)
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char cfg[64] = {0};
|
||||
char buf[64] = {0};
|
||||
|
||||
snprintf(cfg, sizeof(cfg), "input_libretro_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, settings->input.libretro_device[i]);
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_analog_dpad_mode", i + 1);
|
||||
config_set_int(conf, cfg, settings->input.analog_dpad_mode[i]);
|
||||
}
|
||||
snprintf(buf, sizeof(buf), "input_libretro_device_p%u", i + 1);
|
||||
config_set_int(conf, buf, settings->input.libretro_device[i]);
|
||||
snprintf(buf, sizeof(buf), "input_player%u_analog_dpad_mode", i + 1);
|
||||
config_set_int(conf, buf, settings->input.analog_dpad_mode[i]);
|
||||
}
|
||||
|
||||
ret = config_file_write(conf, remap_file);
|
||||
|
Loading…
x
Reference in New Issue
Block a user