Merge pull request #7529 from natinusala/ozone
ozone: fix ghost sidebar when toggling menu + icons update
This commit is contained in:
commit
db1e312da0
|
@ -256,7 +256,7 @@ enum
|
|||
OZONE_ENTRIES_ICONS_TEXTURE_UPDATER,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_VIDEO,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_RECORD,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_MIXER,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_LOG,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_OSD,
|
||||
|
@ -272,6 +272,26 @@ enum
|
|||
OZONE_ENTRIES_ICONS_TEXTURE_OVERRIDE,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_NOTIFICATIONS,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_STREAM,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT,
|
||||
OZONE_ENTRIES_ICONS_TEXTURE_LAST
|
||||
};
|
||||
|
||||
|
@ -540,7 +560,7 @@ static const char *ozone_entries_icon_texture_path(ozone_handle_t *ozone, unsign
|
|||
char icon_fullpath[255];
|
||||
char *icon_name = NULL;
|
||||
|
||||
switch (id)
|
||||
switch (id)
|
||||
{
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_MAIN_MENU:
|
||||
#if defined(HAVE_LAKKA)
|
||||
|
@ -730,7 +750,7 @@ static const char *ozone_entries_icon_texture_path(ozone_handle_t *ozone, unsign
|
|||
case OZONE_ENTRIES_ICONS_TEXTURE_INFO:
|
||||
icon_name = "menu_info.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT:
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS:
|
||||
icon_name = "Libretro - Pad.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_LATENCY:
|
||||
|
@ -793,9 +813,67 @@ static const char *ozone_entries_icon_texture_path(ozone_handle_t *ozone, unsign
|
|||
case OZONE_ENTRIES_ICONS_TEXTURE_STREAM:
|
||||
icon_name = "menu_stream.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN:
|
||||
icon_name = "menu_shutdown.png";
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U:
|
||||
icon_name = "input_DPAD-U.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D:
|
||||
icon_name = "input_DPAD-D.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L:
|
||||
icon_name = "input_DPAD-L.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R:
|
||||
icon_name = "input_DPAD-R.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U:
|
||||
icon_name = "input_STCK-U.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D:
|
||||
icon_name = "input_STCK-D.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L:
|
||||
icon_name = "input_STCK-L.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R:
|
||||
icon_name = "input_STCK-R.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P:
|
||||
icon_name = "input_STCK-P.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U:
|
||||
icon_name = "input_BTN-U.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D:
|
||||
icon_name = "input_BTN-D.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L:
|
||||
icon_name = "input_BTN-L.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R:
|
||||
icon_name = "input_BTN-R.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB:
|
||||
icon_name = "input_LB.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB:
|
||||
icon_name = "input_RB.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT:
|
||||
icon_name = "input_LT.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT:
|
||||
icon_name = "input_RT.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT:
|
||||
icon_name = "input_SELECT.png";
|
||||
break;
|
||||
case OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START:
|
||||
icon_name = "input_START.png";
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
fill_pathname_join(
|
||||
icon_fullpath,
|
||||
ozone->icons_path,
|
||||
|
@ -872,6 +950,17 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
return OZONE_ENTRIES_ICONS_TEXTURE_MOVIE;
|
||||
case MENU_ENUM_LABEL_GOTO_MUSIC:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_MUSIC;
|
||||
|
||||
default:
|
||||
/* Menu icons are here waiting for theme support*/
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (settings->uints.menu_xmb_theme != XMB_ICON_THEME_FLATUI &&
|
||||
settings->uints.menu_xmb_theme != XMB_ICON_THEME_PIXEL )
|
||||
{
|
||||
switch (enum_idx)
|
||||
{
|
||||
/* Menu icons */
|
||||
case MENU_ENUM_LABEL_CONTENT_SETTINGS:
|
||||
case MENU_ENUM_LABEL_UPDATE_ASSETS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_QUICKMENU;
|
||||
|
@ -931,7 +1020,23 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
return OZONE_ENTRIES_ICONS_TEXTURE_MIXER;
|
||||
case MENU_ENUM_LABEL_INPUT_SETTINGS:
|
||||
case MENU_ENUM_LABEL_UPDATE_AUTOCONFIG_PROFILES:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT;
|
||||
case MENU_ENUM_LABEL_INPUT_USER_1_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_2_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_3_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_4_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_5_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_6_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_7_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_8_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_9_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_10_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_11_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_12_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_13_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_14_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_15_BINDS:
|
||||
case MENU_ENUM_LABEL_INPUT_USER_16_BINDS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SETTINGS;
|
||||
case MENU_ENUM_LABEL_LATENCY_SETTINGS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_LATENCY;
|
||||
case MENU_ENUM_LABEL_SAVING_SETTINGS:
|
||||
|
@ -966,6 +1071,7 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
return OZONE_ENTRIES_ICONS_TEXTURE_ACHIEVEMENTS;
|
||||
case MENU_ENUM_LABEL_NETWORK_INFORMATION:
|
||||
case MENU_ENUM_LABEL_NETWORK_SETTINGS:
|
||||
case MENU_ENUM_LABEL_WIFI_SETTINGS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_NETWORK;
|
||||
case MENU_ENUM_LABEL_PLAYLIST_SETTINGS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_PLAYLIST;
|
||||
|
@ -993,9 +1099,17 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
case MENU_ENUM_LABEL_NETPLAY_REFRESH_ROOMS:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_RELOAD;
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_REBOOT:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_RELOAD;
|
||||
case MENU_ENUM_LABEL_SHUTDOWN:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_SHUTDOWN;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(type)
|
||||
{
|
||||
|
@ -1003,7 +1117,6 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
return OZONE_ENTRIES_ICONS_TEXTURE_FOLDER;
|
||||
case FILE_TYPE_PLAIN:
|
||||
case FILE_TYPE_IN_CARCHIVE:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_FILE;
|
||||
case FILE_TYPE_RPL_ENTRY:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_FILE;
|
||||
case FILE_TYPE_SHADER:
|
||||
|
@ -1076,9 +1189,8 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
return OZONE_ENTRIES_ICONS_TEXTURE_ROOM_RELAY;
|
||||
#endif
|
||||
case MENU_SETTING_ACTION:
|
||||
if (ozone->depth <= 3)
|
||||
if (ozone->depth == 3)
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_SETTING;
|
||||
default:
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_SUBSETTING;
|
||||
}
|
||||
|
||||
|
@ -1096,6 +1208,66 @@ static unsigned ozone_entries_icon_get_id(ozone_handle_t *ozone,
|
|||
}
|
||||
#endif
|
||||
|
||||
if (
|
||||
(type >= MENU_SETTINGS_INPUT_DESC_BEGIN) &&
|
||||
(type <= MENU_SETTINGS_INPUT_DESC_END)
|
||||
)
|
||||
{
|
||||
unsigned input_id;
|
||||
input_id = MENU_SETTINGS_INPUT_DESC_BEGIN;
|
||||
while (type > (input_id + 23))
|
||||
{
|
||||
input_id = (input_id + 24) ;
|
||||
}
|
||||
if ( type == input_id )
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_D;
|
||||
if ( type == (input_id + 1))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_L;
|
||||
if ( type == (input_id + 2))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_SELECT;
|
||||
if ( type == (input_id + 3))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_START;
|
||||
if ( type == (input_id + 4))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_U;
|
||||
if ( type == (input_id + 5))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_D;
|
||||
if ( type == (input_id + 6))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_L;
|
||||
if ( type == (input_id + 7))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_DPAD_R;
|
||||
if ( type == (input_id + 8))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_R;
|
||||
if ( type == (input_id + 9))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_BTN_U;
|
||||
if ( type == (input_id + 10))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LB;
|
||||
if ( type == (input_id + 11))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RB;
|
||||
if ( type == (input_id + 12))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_LT;
|
||||
if ( type == (input_id + 13))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_RT;
|
||||
if ( type == (input_id + 14))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P;
|
||||
if ( type == (input_id + 15))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_P;
|
||||
if ( type == (input_id + 16))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R;
|
||||
if ( type == (input_id + 17))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L;
|
||||
if ( type == (input_id + 18))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D;
|
||||
if ( type == (input_id + 19))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U;
|
||||
if ( type == (input_id + 20))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_R;
|
||||
if ( type == (input_id + 21))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_L;
|
||||
if ( type == (input_id + 22))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_D;
|
||||
if ( type == (input_id + 23))
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_INPUT_STCK_U;
|
||||
}
|
||||
return OZONE_ENTRIES_ICONS_TEXTURE_SUBSETTING;
|
||||
}
|
||||
|
||||
|
@ -1210,6 +1382,8 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
|
|||
*userdata = ozone;
|
||||
ozone->selection_buf_old = (file_list_t*)calloc(1, sizeof(file_list_t));
|
||||
ozone->want_horizontal_animation = false;
|
||||
ozone->draw_sidebar = true;
|
||||
ozone->sidebar_offset = 0;
|
||||
|
||||
ozone->system_tab_end = 0;
|
||||
ozone->tabs[ozone->system_tab_end] = OZONE_SYSTEM_TAB_MAIN;
|
||||
|
@ -1422,8 +1596,6 @@ static void ozone_context_reset(void *data, bool is_threaded)
|
|||
ozone->fade_direction = false;
|
||||
ozone->cursor_in_sidebar = false;
|
||||
ozone->cursor_in_sidebar_old = false;
|
||||
ozone->draw_sidebar = true;
|
||||
ozone->sidebar_offset = 0;
|
||||
ozone->draw_old_list = false;
|
||||
|
||||
/* Animations */
|
||||
|
|
Loading…
Reference in New Issue