Mercurial > repos > blastem
diff controller_info.c @ 2041:638eb2d25696 mame_interp
Merge from default
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 05 Aug 2021 09:29:33 -0700 |
parents | 193b804c9845 |
children | a8af8d898a7c |
line wrap: on
line diff
--- a/controller_info.c Sun May 10 00:16:00 2020 -0700 +++ b/controller_info.c Thu Aug 05 09:29:33 2021 -0700 @@ -62,7 +62,10 @@ static const char *variant_names[] = { "normal", "6b bumpers", - "6b right" + "6b right", + "3button", + "6button", + "8button" }; static void load_ctype_config(void) @@ -221,6 +224,15 @@ #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" }; @@ -242,6 +254,12 @@ static char const *labels_genesis[] = { "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", NULL, "Mode" }; +static char const *labels_genesis_3button[] = { + "A", "B", NULL, NULL, NULL, NULL, "Start", NULL, NULL, NULL, "C", NULL, "Mode" +}; +static char const *labels_genesis_8button[] = { + "A", "B", "X", "Y", "Mode", NULL, "Start", NULL, NULL, "Z", "C", "L", "R" +}; static char const *labels_saturn[] = { "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", "LT", "RT" }; @@ -266,7 +284,13 @@ } } else { if (info->subtype == SUBTYPE_GENESIS) { - return labels_genesis; + if (info->variant == VARIANT_8BUTTON) { + return labels_genesis_8button; + } else if (info->variant == VARIANT_3BUTTON) { + return labels_genesis_3button; + } else { + return labels_genesis; + } } else { return labels_saturn; }