@@ -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 */
0 commit comments