comparison nuklear_ui/blastem_nuklear.c @ 2220:dd9d43c67986

Add support for newer controller types. Fix crash caused by new controller button types introduced in 2.0.12 and support mapping them
author Michael Pavone <pavone@retrodev.com>
date Fri, 02 Sep 2022 22:53:41 -0700
parents ff700f50541c
children 93918a6a8ab7
comparison
equal deleted inserted replaced
2219:ff700f50541c 2220:dd9d43c67986
1465 1465
1466 void view_controller_type(struct nk_context *context) 1466 void view_controller_type(struct nk_context *context)
1467 { 1467 {
1468 if (nk_begin(context, "Controller Type", nk_rect(0, 0, render_width(), render_height()), 0)) { 1468 if (nk_begin(context, "Controller Type", nk_rect(0, 0, render_width(), render_height()), 0)) {
1469 controller_type_group(context, "Xbox", TYPE_XBOX, SUBTYPE_XBOX, (const char *[]){ 1469 controller_type_group(context, "Xbox", TYPE_XBOX, SUBTYPE_XBOX, (const char *[]){
1470 "Original", "Xbox 360", "Xbox One" 1470 "Original", "Xbox 360", "Xbox One/Series", "Xbox Elite"
1471 }, 4);
1472 controller_type_group(context, "Playstation", TYPE_PSX, SUBTYPE_PS3, (const char *[]){
1473 "PS3", "PS4", "PS5"
1471 }, 3); 1474 }, 3);
1472 controller_type_group(context, "Playstation", TYPE_PSX, SUBTYPE_PS3, (const char *[]){
1473 "PS3", "PS4"
1474 }, 2);
1475 controller_type_group(context, "Sega", TYPE_SEGA, SUBTYPE_GENESIS, (const char *[]){ 1475 controller_type_group(context, "Sega", TYPE_SEGA, SUBTYPE_GENESIS, (const char *[]){
1476 "Genesis", "Saturn" 1476 "Genesis", "Saturn"
1477 }, 2); 1477 }, 2);
1478 controller_type_group(context, "Nintendo", TYPE_NINTENDO, SUBTYPE_WIIU, (const char *[]){ 1478 controller_type_group(context, "Nintendo", TYPE_NINTENDO, SUBTYPE_WIIU, (const char *[]){
1479 "WiiU", "Switch" 1479 "WiiU", "Switch"