mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Refactor away menu_animation_clear_active
This commit is contained in:
parent
6d6117d5d6
commit
88307565c1
@ -453,8 +453,8 @@ static void rgui_render(void)
|
||||
}
|
||||
|
||||
menu_display_ctl(MENU_DISPLAY_CTL_SET_FRAMEBUFFER_DIRTY_FLAG, NULL);
|
||||
menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||
|
||||
menu_animation_clear_active();
|
||||
rgui->force_redraw = false;
|
||||
|
||||
|
||||
|
@ -1444,7 +1444,7 @@ static void xmb_render(void)
|
||||
if (menu_entries_get_start() >= end)
|
||||
menu_entries_set_start(0);
|
||||
|
||||
menu_animation_clear_active();
|
||||
menu_animation_ctl(MENU_ANIMATION_CTL_CLEAR_ACTIVE, NULL);
|
||||
}
|
||||
|
||||
static void xmb_frame_horizontal_list(xmb_handle_t *xmb,
|
||||
|
@ -678,22 +678,20 @@ void menu_animation_set_active(void)
|
||||
anim->is_active = true;
|
||||
}
|
||||
|
||||
void menu_animation_clear_active(void)
|
||||
{
|
||||
menu_animation_t *anim = menu_animation_get_ptr();
|
||||
if (!anim)
|
||||
return;
|
||||
anim->is_active = false;
|
||||
}
|
||||
|
||||
bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data)
|
||||
{
|
||||
menu_animation_t *anim = menu_animation_get_ptr();
|
||||
|
||||
if (!anim)
|
||||
return false;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case MENU_ANIMATION_CTL_IS_ACTIVE:
|
||||
return anim->is_active;
|
||||
case MENU_ANIMATION_CTL_CLEAR_ACTIVE:
|
||||
anim->is_active = false;
|
||||
return true;
|
||||
case MENU_ANIMATION_CTL_DELTA_TIME:
|
||||
{
|
||||
float *ptr = (float*)data;
|
||||
|
@ -37,6 +37,7 @@ typedef void (*tween_cb) (void);
|
||||
enum menu_animation_ctl_state
|
||||
{
|
||||
MENU_ANIMATION_CTL_IS_ACTIVE = 0,
|
||||
MENU_ANIMATION_CTL_CLEAR_ACTIVE,
|
||||
MENU_ANIMATION_CTL_DELTA_TIME
|
||||
};
|
||||
|
||||
@ -116,8 +117,6 @@ void menu_animation_update_time(void);
|
||||
|
||||
void menu_animation_set_active(void);
|
||||
|
||||
void menu_animation_clear_active(void);
|
||||
|
||||
bool menu_animation_ctl(enum menu_animation_ctl_state state, void *data);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
Reference in New Issue
Block a user