(XMB+OZONE) Use correct icons in Quick Menu control ports with keyboard device type

This commit is contained in:
Tony Jansson 2020-08-15 21:45:48 +03:00
parent 5119b71377
commit b6f37f4245
2 changed files with 24 additions and 8 deletions

View File

@ -458,7 +458,7 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone,
if ( if (
(type >= MENU_SETTINGS_INPUT_BEGIN) && (type >= MENU_SETTINGS_INPUT_BEGIN) &&
(type <= MENU_SETTINGS_INPUT_DESC_END) (type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
) )
{ {
/* This part is only utilized by Input User # Binds */ /* This part is only utilized by Input User # Binds */
@ -492,9 +492,18 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone,
else else
{ {
/* Quickmenu controls repeats the same icons for all users*/ /* Quickmenu controls repeats the same icons for all users*/
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN; if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
while (type > (input_id + 23)) {
input_id = (input_id + 24); input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
while (type > (input_id + 23))
input_id = (input_id + 24);
}
else
{
input_id = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
while (type > (input_id + 15))
input_id = (input_id + 16);
}
} }
/* This is utilized for both Input Binds and Quickmenu controls*/ /* This is utilized for both Input Binds and Quickmenu controls*/
if (type == input_id ) if (type == input_id )

View File

@ -2889,7 +2889,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
if ( if (
(type >= MENU_SETTINGS_INPUT_BEGIN) && (type >= MENU_SETTINGS_INPUT_BEGIN) &&
(type <= MENU_SETTINGS_INPUT_DESC_END) (type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
) )
{ {
unsigned input_id; unsigned input_id;
@ -2923,10 +2923,17 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
else else
{ {
/* Quickmenu controls repeats the same icons for all users */ /* Quickmenu controls repeats the same icons for all users */
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN; if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
while (type > (input_id + 23))
{ {
input_id = (input_id + 24) ; input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
while (type > (input_id + 23))
input_id = (input_id + 24);
}
else
{
input_id = MENU_SETTINGS_INPUT_DESC_KBD_BEGIN;
while (type > (input_id + 15))
input_id = (input_id + 16);
} }
} }
/* This is utilized for both Input # Binds and Quickmenu controls */ /* This is utilized for both Input # Binds and Quickmenu controls */