Skip to content

Commit dcf4286

Browse files
authored
Port bind turbo fire icon + label cleanup (#17979)
1 parent 9c7347c commit dcf4286

File tree

4 files changed

+136
-147
lines changed

4 files changed

+136
-147
lines changed

intl/msg_hash_us.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4421,7 +4421,7 @@ MSG_HASH(
44214421
)
44224422
MSG_HASH(
44234423
MENU_ENUM_LABEL_VALUE_INPUT_TURBO,
4424-
"Turbo"
4424+
"Turbo Fire"
44254425
)
44264426

44274427
/* Settings > Latency */

menu/drivers/ozone.c

Lines changed: 102 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -2447,140 +2447,134 @@ static uintptr_t ozone_entries_icon_get_texture(
24472447
}
24482448

24492449
#ifdef HAVE_CHEEVOS
2450-
if (
2451-
(type >= MENU_SETTINGS_CHEEVOS_START) &&
2452-
(type < MENU_SETTINGS_NETPLAY_ROOMS_START)
2453-
)
2450+
if ( type >= MENU_SETTINGS_CHEEVOS_START
2451+
&& type < MENU_SETTINGS_NETPLAY_ROOMS_START)
24542452
{
24552453
char buffer[64];
24562454
int index = type - MENU_SETTINGS_CHEEVOS_START;
24572455
uintptr_t badge_texture = rcheevos_menu_get_badge_texture(index);
24582456
if (badge_texture)
24592457
return badge_texture;
24602458

2461-
/* no state means its a header - show the info icon */
2459+
/* No state means it's a header, show info icon */
24622460
if (!rcheevos_menu_get_state(index, buffer, sizeof(buffer)))
24632461
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INFO];
24642462

2465-
/* placeholder badge image was not found, show generic menu icon */
2463+
/* Placeholder badge image was not found, show generic menu icon */
24662464
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_ACHIEVEMENTS];
24672465
}
24682466
#endif
24692467

2470-
if (
2471-
(type >= MENU_SETTINGS_INPUT_BEGIN) &&
2472-
(type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
2473-
)
2468+
if ( type >= MENU_SETTINGS_INPUT_BEGIN
2469+
&& type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
2470+
{
2471+
/* This part is only utilized by Input User # Binds */
2472+
unsigned input_id;
2473+
if (type < MENU_SETTINGS_INPUT_DESC_BEGIN)
24742474
{
2475-
/* This part is only utilized by Input User # Binds */
2476-
unsigned input_id;
2477-
if (type < MENU_SETTINGS_INPUT_DESC_BEGIN)
2478-
{
2479-
input_id = MENU_SETTINGS_INPUT_BEGIN;
2480-
if (type == input_id)
2481-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC];
2475+
input_id = MENU_SETTINGS_INPUT_BEGIN;
2476+
if (type == input_id)
2477+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC];
24822478
#ifdef HAVE_LIBNX
2483-
/* account for the additional split joycon option in Input User # Binds */
2484-
input_id++;
2479+
/* Account for the additional split JoyCon option in Input Port # Binds */
2480+
input_id++;
24852481
#endif
2486-
if (type >= input_id + 1 && type <= input_id + 3)
2487-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS];
2488-
if (type == input_id + 4)
2489-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE];
2490-
if (type == input_id + 5)
2491-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL];
2492-
if (type == input_id + 6)
2493-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
2494-
if (type == input_id + 7)
2495-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING];
2496-
if ((type > (input_id + 31)) && (type < (input_id + 43)))
2497-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN];
2498-
if (type == input_id + 43)
2499-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO];
2500-
/* align to use the same code of Quickmenu controls*/
2501-
input_id = input_id + 8;
2502-
}
2482+
if (type >= input_id + 1 && type <= input_id + 3)
2483+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS];
2484+
if (type == input_id + 4)
2485+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE];
2486+
if (type == input_id + 5)
2487+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL];
2488+
if (type == input_id + 6)
2489+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
2490+
if (type == input_id + 7)
2491+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING];
2492+
if (type >= input_id + 32 && type <= input_id + 42)
2493+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN];
2494+
if (type == input_id + 43)
2495+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO];
2496+
/* Align to use the same code of Quickmenu controls */
2497+
input_id = input_id + 8;
2498+
}
2499+
else
2500+
{
2501+
/* Quickmenu controls repeats the same icons for all users */
2502+
if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
2503+
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
25032504
else
2504-
{
2505-
/* Quickmenu controls repeats the same icons for all users*/
2506-
if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
2507-
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
2508-
else
2509-
input_id = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
2510-
while (type > (input_id + 23))
2511-
input_id = (input_id + 24);
2505+
input_id = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
2506+
while (type > (input_id + 23))
2507+
input_id = (input_id + 24);
25122508

2513-
/* Human readable bind order */
2514-
if (type < (input_id + RARCH_ANALOG_BIND_LIST_END))
2509+
/* Human readable bind order */
2510+
if (type < (input_id + RARCH_ANALOG_BIND_LIST_END))
2511+
{
2512+
unsigned index = 0;
2513+
int input_num = type - input_id;
2514+
for (index = 0; index < ARRAY_SIZE(input_config_bind_order); index++)
25152515
{
2516-
unsigned index = 0;
2517-
int input_num = type - input_id;
2518-
for (index = 0; index < ARRAY_SIZE(input_config_bind_order); index++)
2516+
if (input_num == (int)input_config_bind_order[index])
25192517
{
2520-
if ((int)input_config_bind_order[index] == input_num)
2521-
{
2522-
type = input_id + index;
2523-
break;
2524-
}
2518+
type = input_id + index;
2519+
break;
25252520
}
25262521
}
25272522
}
2528-
2529-
/* This is utilized for both Input Binds and Quickmenu controls*/
2530-
if (type == input_id)
2531-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U];
2532-
if (type == (input_id + 1))
2533-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D];
2534-
if (type == (input_id + 2))
2535-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L];
2536-
if (type == (input_id + 3))
2537-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R];
2538-
if (type == (input_id + 4))
2539-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D];
2540-
if (type == (input_id + 5))
2541-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R];
2542-
if (type == (input_id + 6))
2543-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L];
2544-
if (type == (input_id + 7))
2545-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U];
2546-
if (type == (input_id + 8))
2547-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT];
2548-
if (type == (input_id + 9))
2549-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START];
2550-
if (type == (input_id + 10))
2551-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB];
2552-
if (type == (input_id + 11))
2553-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB];
2554-
if (type == (input_id + 12))
2555-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT];
2556-
if (type == (input_id + 13))
2557-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT];
2558-
if (type == (input_id + 14))
2559-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P];
2560-
if (type == (input_id + 15))
2561-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P];
2562-
if (type == (input_id + 16))
2563-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U];
2564-
if (type == (input_id + 17))
2565-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D];
2566-
if (type == (input_id + 18))
2567-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L];
2568-
if (type == (input_id + 19))
2569-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R];
2570-
if (type == (input_id + 20))
2571-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U];
2572-
if (type == (input_id + 21))
2573-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D];
2574-
if (type == (input_id + 22))
2575-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L];
2576-
if (type == (input_id + 23))
2577-
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R];
25782523
}
25792524

2580-
if (
2581-
(type >= MENU_SETTINGS_REMAPPING_PORT_BEGIN) &&
2582-
(type <= MENU_SETTINGS_REMAPPING_PORT_END)
2583-
)
2525+
/* This is used for both Input Port Binds and Quickmenu controls */
2526+
if (type == input_id)
2527+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U];
2528+
if (type == (input_id + 1))
2529+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D];
2530+
if (type == (input_id + 2))
2531+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L];
2532+
if (type == (input_id + 3))
2533+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R];
2534+
if (type == (input_id + 4))
2535+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D];
2536+
if (type == (input_id + 5))
2537+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R];
2538+
if (type == (input_id + 6))
2539+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L];
2540+
if (type == (input_id + 7))
2541+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U];
2542+
if (type == (input_id + 8))
2543+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT];
2544+
if (type == (input_id + 9))
2545+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START];
2546+
if (type == (input_id + 10))
2547+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB];
2548+
if (type == (input_id + 11))
2549+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB];
2550+
if (type == (input_id + 12))
2551+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT];
2552+
if (type == (input_id + 13))
2553+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT];
2554+
if (type == (input_id + 14))
2555+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P];
2556+
if (type == (input_id + 15))
2557+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P];
2558+
if (type == (input_id + 16))
2559+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U];
2560+
if (type == (input_id + 17))
2561+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D];
2562+
if (type == (input_id + 18))
2563+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L];
2564+
if (type == (input_id + 19))
2565+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R];
2566+
if (type == (input_id + 20))
2567+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U];
2568+
if (type == (input_id + 21))
2569+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D];
2570+
if (type == (input_id + 22))
2571+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L];
2572+
if (type == (input_id + 23))
2573+
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R];
2574+
}
2575+
2576+
if ( type >= MENU_SETTINGS_REMAPPING_PORT_BEGIN
2577+
&& type <= MENU_SETTINGS_REMAPPING_PORT_END)
25842578
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS];
25852579

25862580
/* No icon by default */

menu/drivers/xmb.c

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -4008,28 +4008,27 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
40084008
if (badge_texture)
40094009
return badge_texture;
40104010

4011-
/* No state means its a header - show the info icon */
4011+
/* No state means it's a header, show info icon */
40124012
if (!rcheevos_menu_get_state(index, buffer, sizeof(buffer)))
40134013
return xmb->textures.list[XMB_TEXTURE_INFO];
4014-
/* Placeholder badge image was not found,
4015-
show generic menu icon */
4014+
4015+
/* Placeholder badge image was not found, show generic menu icon */
40164016
return xmb->textures.list[XMB_TEXTURE_ACHIEVEMENTS];
40174017
}
40184018
#endif
40194019

40204020
if ( type >= MENU_SETTINGS_INPUT_BEGIN
40214021
&& type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
40224022
{
4023+
/* This part is only utilized by Input User # Binds */
40234024
unsigned input_id;
40244025
if (type < MENU_SETTINGS_INPUT_DESC_BEGIN)
4025-
/* Input User # Binds only */
40264026
{
40274027
input_id = MENU_SETTINGS_INPUT_BEGIN;
40284028
if (type == input_id)
40294029
return xmb->textures.list[XMB_TEXTURE_INPUT_ADC];
40304030
#ifdef HAVE_LIBNX
4031-
/* Account for the additional split JoyCon
4032-
option in Input # Binds */
4031+
/* Account for the additional split JoyCon option in Input Port # Binds */
40334032
input_id++;
40344033
#endif
40354034
if (type >= input_id + 1 && type <= input_id + 3)
@@ -4042,7 +4041,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
40424041
return xmb->textures.list[XMB_TEXTURE_RELOAD];
40434042
if (type == input_id + 7)
40444043
return xmb->textures.list[XMB_TEXTURE_SAVING];
4045-
if ((type > (input_id + 31)) && (type < (input_id + 43)))
4044+
if (type >= input_id + 32 && type <= input_id + 42)
40464045
return xmb->textures.list[XMB_TEXTURE_INPUT_LGUN];
40474046
if (type == input_id + 43)
40484047
return xmb->textures.list[XMB_TEXTURE_INPUT_TURBO];
@@ -4051,8 +4050,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
40514050
}
40524051
else
40534052
{
4054-
/* Quickmenu controls repeats the same icons
4055-
for all users */
4053+
/* Quickmenu controls repeats the same icons for all users */
40564054
if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
40574055
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
40584056
else
@@ -4065,9 +4063,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
40654063
{
40664064
unsigned index = 0;
40674065
int input_num = type - input_id;
4068-
for ( index = 0;
4069-
index < ARRAY_SIZE(input_config_bind_order);
4070-
index++)
4066+
for (index = 0; index < ARRAY_SIZE(input_config_bind_order); index++)
40714067
{
40724068
if (input_num == (int)input_config_bind_order[index])
40734069
{
@@ -4078,55 +4074,54 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
40784074
}
40794075
}
40804076

4081-
/* This is utilized for both Input # Binds
4082-
and Quickmenu controls */
4077+
/* This is used for both Input Port Binds and Quickmenu controls */
40834078
if (type == input_id)
40844079
return xmb->textures.list[XMB_TEXTURE_INPUT_DPAD_U];
4085-
else if (type == (input_id + 1))
4080+
if (type == (input_id + 1))
40864081
return xmb->textures.list[XMB_TEXTURE_INPUT_DPAD_D];
4087-
else if (type == (input_id + 2))
4082+
if (type == (input_id + 2))
40884083
return xmb->textures.list[XMB_TEXTURE_INPUT_DPAD_L];
4089-
else if (type == (input_id + 3))
4084+
if (type == (input_id + 3))
40904085
return xmb->textures.list[XMB_TEXTURE_INPUT_DPAD_R];
4091-
else if (type == (input_id + 4))
4086+
if (type == (input_id + 4))
40924087
return xmb->textures.list[XMB_TEXTURE_INPUT_BTN_D];
4093-
else if (type == (input_id + 5))
4088+
if (type == (input_id + 5))
40944089
return xmb->textures.list[XMB_TEXTURE_INPUT_BTN_R];
4095-
else if (type == (input_id + 6))
4090+
if (type == (input_id + 6))
40964091
return xmb->textures.list[XMB_TEXTURE_INPUT_BTN_L];
4097-
else if (type == (input_id + 7))
4092+
if (type == (input_id + 7))
40984093
return xmb->textures.list[XMB_TEXTURE_INPUT_BTN_U];
4099-
else if (type == (input_id + 8))
4094+
if (type == (input_id + 8))
41004095
return xmb->textures.list[XMB_TEXTURE_INPUT_SELECT];
4101-
else if (type == (input_id + 9))
4096+
if (type == (input_id + 9))
41024097
return xmb->textures.list[XMB_TEXTURE_INPUT_START];
4103-
else if (type == (input_id + 10))
4098+
if (type == (input_id + 10))
41044099
return xmb->textures.list[XMB_TEXTURE_INPUT_LB];
4105-
else if (type == (input_id + 11))
4100+
if (type == (input_id + 11))
41064101
return xmb->textures.list[XMB_TEXTURE_INPUT_RB];
4107-
else if (type == (input_id + 12))
4102+
if (type == (input_id + 12))
41084103
return xmb->textures.list[XMB_TEXTURE_INPUT_LT];
4109-
else if (type == (input_id + 13))
4104+
if (type == (input_id + 13))
41104105
return xmb->textures.list[XMB_TEXTURE_INPUT_RT];
4111-
else if (type == (input_id + 14))
4106+
if (type == (input_id + 14))
41124107
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_P];
4113-
else if (type == (input_id + 15))
4108+
if (type == (input_id + 15))
41144109
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_P];
4115-
else if (type == (input_id + 16))
4110+
if (type == (input_id + 16))
41164111
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_U];
4117-
else if (type == (input_id + 17))
4112+
if (type == (input_id + 17))
41184113
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_D];
4119-
else if (type == (input_id + 18))
4114+
if (type == (input_id + 18))
41204115
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_L];
4121-
else if (type == (input_id + 19))
4116+
if (type == (input_id + 19))
41224117
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_R];
4123-
else if (type == (input_id + 20))
4118+
if (type == (input_id + 20))
41244119
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_U];
4125-
else if (type == (input_id + 21))
4120+
if (type == (input_id + 21))
41264121
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_D];
4127-
else if (type == (input_id + 22))
4122+
if (type == (input_id + 22))
41284123
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_L];
4129-
else if (type == (input_id + 23))
4124+
if (type == (input_id + 23))
41304125
return xmb->textures.list[XMB_TEXTURE_INPUT_STCK_R];
41314126
}
41324127
if ( type >= MENU_SETTINGS_REMAPPING_PORT_BEGIN

0 commit comments

Comments
 (0)