diff 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
line wrap: on
line diff
--- a/nuklear_ui/blastem_nuklear.c	Thu Sep 01 22:43:02 2022 -0700
+++ b/nuklear_ui/blastem_nuklear.c	Fri Sep 02 22:53:41 2022 -0700
@@ -1467,11 +1467,11 @@
 {
 	if (nk_begin(context, "Controller Type", nk_rect(0, 0, render_width(), render_height()), 0)) {
 		controller_type_group(context, "Xbox", TYPE_XBOX, SUBTYPE_XBOX, (const char *[]){
-			"Original", "Xbox 360", "Xbox One"
-		}, 3);
+			"Original", "Xbox 360", "Xbox One/Series", "Xbox Elite"
+		}, 4);
 		controller_type_group(context, "Playstation", TYPE_PSX, SUBTYPE_PS3, (const char *[]){
-			"PS3", "PS4"
-		}, 2);
+			"PS3", "PS4", "PS5"
+		}, 3);
 		controller_type_group(context, "Sega", TYPE_SEGA, SUBTYPE_GENESIS, (const char *[]){
 			"Genesis", "Saturn"
 		}, 2);