summaryrefslogtreecommitdiff
path: root/controller_info.c
diff options
context:
space:
mode:
authorMichael Pavone <pavone@retrodev.com>2020-11-09 00:29:47 -0800
committerMichael Pavone <pavone@retrodev.com>2020-11-09 00:29:47 -0800
commit4ddbae8255a0f223846c86b41d8b4e4cdcc1d8e2 (patch)
tree9013ab6232989a3cb8861209e46bbf6a26c6ffa1 /controller_info.c
parent73a30109f67c3d168684ab26f10e9f51df676528 (diff)
Add a UI button to reset config to defaults
Diffstat (limited to 'controller_info.c')
-rw-r--r--controller_info.c9
1 files changed, 9 insertions, 0 deletions
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"
};