# HG changeset patch # User Michael Pavone # Date 1606028882 28800 # Node ID e42c45ff06d557fe44dbf4cf00e24ed1a0404447 # Parent 81eebbe6b2e32d8c6bc9fcfdcb96d7be53669513 Add Genesis 6-button contoller image diff -r 81eebbe6b2e3 -r e42c45ff06d5 images/genesis_6b.png Binary file images/genesis_6b.png has changed diff -r 81eebbe6b2e3 -r e42c45ff06d5 nuklear_ui/blastem_nuklear.c --- 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();