1
0
mirror of https://github.com/libretro/RetroArch synced 2024-07-08 12:15:49 +00:00

Merge pull request #11201 from sonninnos/quickmenu_keyboard_icons

(XMB+OZONE) Use correct icons in Quick Menu control ports with keyboard device type
This commit is contained in:
Autechre 2020-08-15 22:58:06 +02:00 committed by GitHub
commit 6416e66954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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 (
(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 */
@ -492,9 +492,18 @@ uintptr_t ozone_entries_icon_get_texture(ozone_handle_t *ozone,
else
{
/* Quickmenu controls repeats the same icons for all users*/
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
while (type > (input_id + 23))
input_id = (input_id + 24);
if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
{
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*/
if (type == input_id )

View File

@ -2889,7 +2889,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
if (
(type >= MENU_SETTINGS_INPUT_BEGIN) &&
(type <= MENU_SETTINGS_INPUT_DESC_END)
(type <= MENU_SETTINGS_INPUT_DESC_KBD_END)
)
{
unsigned input_id;
@ -2923,10 +2923,17 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
else
{
/* Quickmenu controls repeats the same icons for all users */
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
while (type > (input_id + 23))
if (type < MENU_SETTINGS_INPUT_DESC_KBD_BEGIN)
{
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 */