changeset 2020:e42c45ff06d5

Add Genesis 6-button contoller image
author Michael Pavone <pavone@retrodev.com>
date Sat, 21 Nov 2020 23:08:02 -0800
parents 81eebbe6b2e3
children 270a4c875e0a
files images/genesis_6b.png nuklear_ui/blastem_nuklear.c
diffstat 2 files changed, 9 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
Binary file images/genesis_6b.png has changed
--- a/nuklear_ui/blastem_nuklear.c	Sat Nov 21 22:55:40 2020 -0800
+++ b/nuklear_ui/blastem_nuklear.c	Sat Nov 21 23:08:02 2020 -0800
@@ -31,7 +31,8 @@
 	struct nk_image  ui;
 } ui_image;
 
-static ui_image **ui_images, *controller_360, *controller_ps4, *controller_ps4_6b, *controller_wiiu;
+static ui_image **ui_images, *controller_360, *controller_ps4, 
+	*controller_ps4_6b, *controller_wiiu, *controller_gen_6b;
 static uint32_t num_ui_images, ui_image_storage;
 
 typedef void (*view_fun)(struct nk_context *);
@@ -988,8 +989,12 @@
 
 static ui_image *select_best_image(controller_info *info)
 {
-	if (info->variant != VARIANT_NORMAL) {
-		return controller_ps4_6b;
+	if (info->variant != VARIANT_NORMAL || info->type == TYPE_SEGA) {
+		if (info->type == TYPE_PSX) {
+			return controller_ps4_6b;
+		} else {
+			return controller_gen_6b;
+		}
 	} else if (info->type == TYPE_PSX) {
 		return controller_ps4;
 	} else if (info->type == TYPE_NINTENDO) {
@@ -2380,6 +2385,7 @@
 	controller_ps4 = load_ui_image("images/ps4.png");
 	controller_ps4_6b = load_ui_image("images/ps4_6b.png");
 	controller_wiiu = load_ui_image("images/wiiu.png");
+	controller_gen_6b = load_ui_image("images/genesis_6b.png");
 	
 	texture_init();