From a973d5dc8ad2682b7918fb79e21f001117bf1270 Mon Sep 17 00:00:00 2001 From: radius Date: Sat, 5 Aug 2017 00:09:46 -0500 Subject: [PATCH] allow saving analog dpad mode and libretro device to remap files --- CHANGES.md | 2 ++ input/input_remapping.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index e8de27aadd..d83f646e7e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,8 @@ - INPUT: input swap override flag (for remotes) is cleared correctly - INPUT: allow specifying libretro device in remap files - INPUT: allow specifying analog dpad mode in remap files +- INPUT: allow saving libretro device to remap files +- INPUT: allow saving analog dpad mode to remap files - COMMON: Add 'Delete Core'option to Core Information menu. - COMMON: Allow Max Timing Skew to be set to 0. - LOCALIZATION: Update Russian translation diff --git a/input/input_remapping.c b/input/input_remapping.c index f86b1a11ea..1d9bc79af9 100644 --- a/input/input_remapping.c +++ b/input/input_remapping.c @@ -170,6 +170,10 @@ bool input_remapping_save_file(const char *path) config_unset(conf,key_ident[j]); } } + snprintf(buf, sizeof(buf), "input_libretro_device_p%u", i + 1); + config_set_int(conf, buf, input_config_get_device(i)); + snprintf(buf, sizeof(buf), "input_player%u_analog_dpad_mode", i + 1); + config_set_int(conf, buf, settings->uints.input_analog_dpad_mode[i]); } ret = config_file_write(conf, remap_file);