Mercurial > repos > blastem
comparison 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 |
comparison
equal
deleted
inserted
replaced
1984:0d5f88e53dca | 2041:638eb2d25696 |
---|---|
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) { |
219 free(full); | 222 free(full); |
220 handle_joy_added(joystick); | 223 handle_joy_added(joystick); |
221 #endif | 224 #endif |
222 } | 225 } |
223 | 226 |
227 void delete_controller_info(void) | |
228 { | |
229 delete_custom_config_at("controller_types.cfg"); | |
230 loaded = 0; | |
231 tern_free(info_config); | |
232 info_config = NULL; | |
233 render_reset_mappings(); | |
234 } | |
235 | |
224 char const *labels_xbox[] = { | 236 char const *labels_xbox[] = { |
225 "A", "B", "X", "Y", "Back", NULL, "Start", "Click", "Click", "White", "Black", "LT", "RT" | 237 "A", "B", "X", "Y", "Back", NULL, "Start", "Click", "Click", "White", "Black", "LT", "RT" |
226 }; | 238 }; |
227 char const *labels_360[] = { | 239 char const *labels_360[] = { |
228 "A", "B", "X", "Y", "Back", "Xbox", "Start", "Click", "Click", "LB", "RB", "LT", "RT" | 240 "A", "B", "X", "Y", "Back", "Xbox", "Start", "Click", "Click", "LB", "RB", "LT", "RT" |
239 static char const *labels_nintendo[] = { | 251 static char const *labels_nintendo[] = { |
240 "B", "A", "Y", "X", "-", "Home", "+", "Click", "Click", "L", "R", "ZL", "ZR" | 252 "B", "A", "Y", "X", "-", "Home", "+", "Click", "Click", "L", "R", "ZL", "ZR" |
241 }; | 253 }; |
242 static char const *labels_genesis[] = { | 254 static char const *labels_genesis[] = { |
243 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", NULL, "Mode" | 255 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", NULL, "Mode" |
256 }; | |
257 static char const *labels_genesis_3button[] = { | |
258 "A", "B", NULL, NULL, NULL, NULL, "Start", NULL, NULL, NULL, "C", NULL, "Mode" | |
259 }; | |
260 static char const *labels_genesis_8button[] = { | |
261 "A", "B", "X", "Y", "Mode", NULL, "Start", NULL, NULL, "Z", "C", "L", "R" | |
244 }; | 262 }; |
245 static char const *labels_saturn[] = { | 263 static char const *labels_saturn[] = { |
246 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", "LT", "RT" | 264 "A", "B", "X", "Y", NULL, NULL, "Start", NULL, NULL, "Z", "C", "LT", "RT" |
247 }; | 265 }; |
248 | 266 |
264 } else { | 282 } else { |
265 return labels_xbox; | 283 return labels_xbox; |
266 } | 284 } |
267 } else { | 285 } else { |
268 if (info->subtype == SUBTYPE_GENESIS) { | 286 if (info->subtype == SUBTYPE_GENESIS) { |
269 return labels_genesis; | 287 if (info->variant == VARIANT_8BUTTON) { |
288 return labels_genesis_8button; | |
289 } else if (info->variant == VARIANT_3BUTTON) { | |
290 return labels_genesis_3button; | |
291 } else { | |
292 return labels_genesis; | |
293 } | |
270 } else { | 294 } else { |
271 return labels_saturn; | 295 return labels_saturn; |
272 } | 296 } |
273 } | 297 } |
274 } | 298 } |