comparison controller_info.c @ 2015:8a64d86cc362

Use different variants for Genesis controllers to better represent what types are out there
author Michael Pavone <pavone@retrodev.com>
date Wed, 04 Nov 2020 22:55:26 -0800
parents fc05f49075c2
children 193b804c9845
comparison
equal deleted inserted replaced
2014:9ca255be938d 2015:8a64d86cc362
60 "Saturn" 60 "Saturn"
61 }; 61 };
62 static const char *variant_names[] = { 62 static const char *variant_names[] = {
63 "normal", 63 "normal",
64 "6b bumpers", 64 "6b bumpers",
65 "6b right" 65 "6b right",
66 "3button",
67 "6button",
68 "8button"
66 }; 69 };
67 70
68 static void load_ctype_config(void) 71 static void load_ctype_config(void)
69 { 72 {
70 if (!loaded) { 73 if (!loaded) {
240 "B", "A", "Y", "X", "-", "Home", "+", "Click", "Click", "L", "R", "ZL", "ZR" 243 "B", "A", "Y", "X", "-", "Home", "+", "Click", "Click", "L", "R", "ZL", "ZR"
241 }; 244 };
242 static char const *labels_genesis[] = { 245 static char const *labels_genesis[] = {
243 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", NULL, "Mode" 246 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", NULL, "Mode"
244 }; 247 };
248 static char const *labels_genesis_3button[] = {
249 "A", "B", NULL, NULL, NULL, NULL, "Start", NULL, NULL, NULL, "C", NULL, "Mode"
250 };
251 static char const *labels_genesis_8button[] = {
252 "A", "B", "X", "Y", "Mode", NULL, "Start", NULL, NULL, "Z", "C", "L", "R"
253 };
245 static char const *labels_saturn[] = { 254 static char const *labels_saturn[] = {
246 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", "LT", "RT" 255 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", "LT", "RT"
247 }; 256 };
248 257
249 static const char** label_source(controller_info *info) 258 static const char** label_source(controller_info *info)
264 } else { 273 } else {
265 return labels_xbox; 274 return labels_xbox;
266 } 275 }
267 } else { 276 } else {
268 if (info->subtype == SUBTYPE_GENESIS) { 277 if (info->subtype == SUBTYPE_GENESIS) {
269 return labels_genesis; 278 if (info->variant == VARIANT_8BUTTON) {
279 return labels_genesis_8button;
280 } else if (info->variant == VARIANT_3BUTTON) {
281 return labels_genesis_3button;
282 } else {
283 return labels_genesis;
284 }
270 } else { 285 } else {
271 return labels_saturn; 286 return labels_saturn;
272 } 287 }
273 } 288 }
274 } 289 }