From 4ddbae8255a0f223846c86b41d8b4e4cdcc1d8e2 Mon Sep 17 00:00:00 2001 From: Michael Pavone Date: Mon, 9 Nov 2020 00:29:47 -0800 Subject: Add a UI button to reset config to defaults --- controller_info.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'controller_info.c') diff --git a/controller_info.c b/controller_info.c index 9fef8dd..af3469b 100644 --- a/controller_info.c +++ b/controller_info.c @@ -224,6 +224,15 @@ void save_controller_mapping(int joystick, char *mapping_string) #endif } +void delete_controller_info(void) +{ + delete_custom_config_at("controller_types.cfg"); + loaded = 0; + tern_free(info_config); + info_config = NULL; + render_reset_mappings(); +} + char const *labels_xbox[] = { "A", "B", "X", "Y", "Back", NULL, "Start", "Click", "Click", "White", "Black", "LT", "RT" }; -- cgit v1.2.3