(XMB+Ozone) Fix input icons

This commit is contained in:
sonninnos 2022-03-15 22:54:35 +02:00 committed by Autechre
parent 5253e4be23
commit 646b0f7209
2 changed files with 17 additions and 21 deletions

View File

@ -2094,29 +2094,27 @@ static uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone,
{ {
input_id = MENU_SETTINGS_INPUT_BEGIN; input_id = MENU_SETTINGS_INPUT_BEGIN;
if (type == input_id) if (type == input_id)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SETTING];
if (type == input_id + 1)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_ADC];
#ifdef HAVE_LIBNX #ifdef HAVE_LIBNX
/* account for the additional split joycon option in Input User # Binds */ /* account for the additional split joycon option in Input User # Binds */
input_id++; input_id++;
#endif #endif
if (type == input_id + 2) if (type == input_id + 1)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS];
if (type == input_id + 3) if (type == input_id + 2)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_MOUSE];
if (type == input_id + 4) if (type == input_id + 3)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BIND_ALL];
if (type == input_id + 5) if (type == input_id + 4)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RELOAD];
if (type == input_id + 6) if (type == input_id + 5)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_SAVING];
if ((type > (input_id + 30)) && (type < (input_id + 42))) if ((type > (input_id + 29)) && (type < (input_id + 41)))
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LGUN];
if (type == input_id + 42) if (type == input_id + 41)
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO]; return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_INPUT_TURBO];
/* align to use the same code of Quickmenu controls*/ /* align to use the same code of Quickmenu controls*/
input_id = input_id + 7; input_id = input_id + 6;
} }
else else
{ {

View File

@ -3051,30 +3051,28 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
/* Input User # Binds only */ /* Input User # Binds only */
{ {
input_id = MENU_SETTINGS_INPUT_BEGIN; input_id = MENU_SETTINGS_INPUT_BEGIN;
if ( type == input_id) if (type == input_id)
return xmb->textures.list[XMB_TEXTURE_SETTING];
if ( type == input_id + 1)
return xmb->textures.list[XMB_TEXTURE_INPUT_ADC]; return xmb->textures.list[XMB_TEXTURE_INPUT_ADC];
#ifdef HAVE_LIBNX #ifdef HAVE_LIBNX
/* account for the additional split joycon option in Input # Binds */ /* account for the additional split joycon option in Input # Binds */
input_id++; input_id++;
#endif #endif
if ( type == input_id + 2) if (type == input_id + 1)
return xmb->textures.list[XMB_TEXTURE_INPUT_SETTINGS]; return xmb->textures.list[XMB_TEXTURE_INPUT_SETTINGS];
if ( type == input_id + 3) if (type == input_id + 2)
return xmb->textures.list[XMB_TEXTURE_INPUT_MOUSE]; return xmb->textures.list[XMB_TEXTURE_INPUT_MOUSE];
if ( type == input_id + 4) if (type == input_id + 3)
return xmb->textures.list[XMB_TEXTURE_INPUT_BIND_ALL]; return xmb->textures.list[XMB_TEXTURE_INPUT_BIND_ALL];
if ( type == input_id + 5) if (type == input_id + 4)
return xmb->textures.list[XMB_TEXTURE_RELOAD]; return xmb->textures.list[XMB_TEXTURE_RELOAD];
if ( type == input_id + 6) if (type == input_id + 5)
return xmb->textures.list[XMB_TEXTURE_SAVING]; return xmb->textures.list[XMB_TEXTURE_SAVING];
if ((type > (input_id + 30)) && (type < (input_id + 42))) if ((type > (input_id + 29)) && (type < (input_id + 41)))
return xmb->textures.list[XMB_TEXTURE_INPUT_LGUN]; return xmb->textures.list[XMB_TEXTURE_INPUT_LGUN];
if ( type == input_id + 42) if (type == input_id + 41)
return xmb->textures.list[XMB_TEXTURE_INPUT_TURBO]; return xmb->textures.list[XMB_TEXTURE_INPUT_TURBO];
/* align to use the same code of Quickmenu controls */ /* align to use the same code of Quickmenu controls */
input_id = input_id + 7; input_id = input_id + 6;
} }
else else
{ {