mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Add three ways to indicate that the menu should update video -
(1) an animation is active, (2) a label has its contents updated (can be a message ticker or say an FPS monitor label being constantly updated, and (3) the menu framebuffer is 'dirty' (meaning its contents has changed and therefore we need to upload it again to the GPU.
This commit is contained in:
parent
ee1654d695
commit
b5b59608dd
16
general.h
16
general.h
@ -470,8 +470,20 @@ struct runloop
|
||||
{
|
||||
struct
|
||||
{
|
||||
bool is_animated;
|
||||
bool framebuf_dirty;
|
||||
struct
|
||||
{
|
||||
bool is_updated;
|
||||
} label;
|
||||
|
||||
struct
|
||||
{
|
||||
bool is_active;
|
||||
} animation;
|
||||
|
||||
struct
|
||||
{
|
||||
bool dirty;
|
||||
} framebuf;
|
||||
} menu;
|
||||
} current;
|
||||
} video;
|
||||
|
@ -385,8 +385,9 @@ int menu_iterate(retro_input_t input,
|
||||
menu->dt = IDEAL_DT / 4;
|
||||
menu->old_time = menu->cur_time;
|
||||
|
||||
g_runloop.frames.video.current.menu.is_animated = false;
|
||||
g_runloop.frames.video.current.menu.framebuf_dirty = false;
|
||||
g_runloop.frames.video.current.menu.animation.is_active = false;
|
||||
g_runloop.frames.video.current.menu.label.is_updated = false;
|
||||
g_runloop.frames.video.current.menu.framebuf.dirty = false;
|
||||
|
||||
if (driver.menu_ctx)
|
||||
{
|
||||
|
@ -448,7 +448,7 @@ void menu_animation_update(animation_t *animation, float dt)
|
||||
return;
|
||||
}
|
||||
|
||||
g_runloop.frames.video.current.menu.is_animated = true;
|
||||
g_runloop.frames.video.current.menu.animation.is_active = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -509,5 +509,5 @@ void menu_animation_ticker_line(char *buf, size_t len, unsigned idx,
|
||||
else
|
||||
strlcpy(buf, str + right_offset, len + 1);
|
||||
|
||||
g_runloop.frames.video.current.menu.is_animated = true;
|
||||
g_runloop.frames.video.current.menu.animation.is_active = true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user