(Ozone) Cleanups - move some static variables to only function
that needed them - and some other cleanups in loops
This commit is contained in:
parent
ad29b70d9e
commit
45896eb26e
|
@ -128,6 +128,13 @@ void ozone_draw_sidebar(
|
|||
enum gfx_animation_ticker_type
|
||||
menu_ticker_type = (enum gfx_animation_ticker_type)settings->uints.menu_ticker_type;
|
||||
|
||||
selection_y = 0;
|
||||
selection_old_y = 0;
|
||||
horizontal_list_size = 0;
|
||||
|
||||
if (!ozone->draw_sidebar)
|
||||
return;
|
||||
|
||||
/* Initial ticker configuration */
|
||||
if (use_smooth_ticker)
|
||||
{
|
||||
|
@ -146,13 +153,6 @@ void ozone_draw_sidebar(
|
|||
ticker.spacer = ticker_spacer;
|
||||
}
|
||||
|
||||
selection_y = 0;
|
||||
selection_old_y = 0;
|
||||
horizontal_list_size = 0;
|
||||
|
||||
if (!ozone->draw_sidebar)
|
||||
return;
|
||||
|
||||
if (ozone->horizontal_list)
|
||||
horizontal_list_size = (unsigned)ozone->horizontal_list->size;
|
||||
|
||||
|
@ -608,13 +608,9 @@ void ozone_sidebar_goto(ozone_handle_t *ozone, unsigned new_selection)
|
|||
gfx_animation_push(&entry);
|
||||
|
||||
if (new_selection > ozone->system_tab_end)
|
||||
{
|
||||
ozone_change_tab(ozone, MENU_ENUM_LABEL_HORIZONTAL_MENU, MENU_SETTING_HORIZONTAL_MENU);
|
||||
}
|
||||
else
|
||||
{
|
||||
ozone_change_tab(ozone, ozone_system_tabs_idx[ozone->tabs[new_selection]], ozone_system_tabs_type[ozone->tabs[new_selection]]);
|
||||
}
|
||||
}
|
||||
|
||||
void ozone_refresh_sidebars(ozone_handle_t *ozone, unsigned video_height)
|
||||
|
@ -984,9 +980,7 @@ bool ozone_is_playlist(ozone_handle_t *ozone, bool depth)
|
|||
bool is_playlist;
|
||||
|
||||
if (ozone->categories_selection_ptr > ozone->system_tab_end)
|
||||
{
|
||||
is_playlist = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (ozone->tabs[ozone->categories_selection_ptr])
|
||||
|
@ -1014,8 +1008,6 @@ bool ozone_is_playlist(ozone_handle_t *ozone, bool depth)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (depth)
|
||||
return is_playlist && ozone->depth == 1;
|
||||
|
||||
|
|
|
@ -294,9 +294,6 @@ ozone_theme_t *ozone_default_theme = &ozone_theme_dark; /* also used as
|
|||
* opacity */
|
||||
float last_framebuffer_opacity = -1.0f;
|
||||
|
||||
static float background_running_alpha_top = 1.0f;
|
||||
static float background_running_alpha_bottom = 0.75f;
|
||||
|
||||
void ozone_set_color_theme(ozone_handle_t *ozone, unsigned color_theme)
|
||||
{
|
||||
ozone_theme_t *theme = ozone_default_theme;
|
||||
|
@ -355,9 +352,12 @@ unsigned ozone_get_system_theme(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
void ozone_set_background_running_opacity(ozone_handle_t *ozone, float framebuffer_opacity)
|
||||
void ozone_set_background_running_opacity(
|
||||
ozone_handle_t *ozone, float framebuffer_opacity)
|
||||
{
|
||||
float *background = NULL;
|
||||
static float background_running_alpha_top = 1.0f;
|
||||
static float background_running_alpha_bottom = 0.75f;
|
||||
float *background = NULL;
|
||||
|
||||
if (!ozone || !ozone->theme->background_libretro_running)
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue