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:
twinaphex 2015-03-08 16:55:25 +01:00
parent ee1654d695
commit b5b59608dd
3 changed files with 19 additions and 6 deletions

View File

@ -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;

View File

@ -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)
{

View File

@ -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;
}