Create g_runloop.frame.video.current.menu.is_animated and

g_runloop.frame.video.current.menu.framebuf_dirty - will be used
to inform processes or runloops outside of RA's runloop that video update
needs to happen because of animations or video state changes
occurring.
This commit is contained in:
twinaphex 2015-03-07 17:15:42 +01:00
parent 37271a0d13
commit e86efd320c
3 changed files with 19 additions and 0 deletions

View File

@ -466,6 +466,14 @@ struct runloop
{
unsigned count;
unsigned max;
struct
{
struct
{
bool is_animated;
bool framebuf_dirty;
} menu;
} current;
} video;
struct

View File

@ -385,6 +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;
if (driver.menu_ctx)
{
if (driver.menu_ctx->set_texture)

View File

@ -18,6 +18,7 @@
#include <math.h>
#include <string.h>
#include <compat/strl.h>
#include "../general.h"
/* from https://github.com/kikito/tween.lua/blob/master/tween.lua */
@ -442,7 +443,12 @@ void menu_animation_update(animation_t *animation, float dt)
menu_animation_iterate(&animation->list[i], dt, &active_tweens);
if (!active_tweens)
{
animation->size = 0;
return;
}
g_runloop.frames.video.current.menu.is_animated = true;
}
/**
@ -502,4 +508,6 @@ void menu_animation_ticker_line(char *buf, size_t len, unsigned idx,
strlcpy(buf, str + str_len - len, len + 1);
else
strlcpy(buf, str + right_offset, len + 1);
g_runloop.frames.video.current.menu.is_animated = true;
}