/*---------------------------------------------------------------------------*/
-static float state_time;
+static float state_time;
+static int state_drawn;
static struct state *state;
struct state *curr_state(void)
if (state && state->leave)
state->leave(state->gui_id);
- state = st;
- state_time = 0;
+ state = st;
+ state_time = 0;
+ state_drawn = 0;
if (state && state->enter)
state->gui_id = state->enter();
{
int stereo = config_get_d(CONFIG_STEREO);
+ state_drawn = 1;
+
if (state && state->paint)
{
if (stereo)
{
glDrawBuffer(GL_BACK_LEFT);
- config_clear();
+ video_clear();
state->paint(state->gui_id, t);
glDrawBuffer(GL_BACK_RIGHT);
- config_clear();
+ video_clear();
state->paint(state->gui_id, t);
}
else
{
- config_clear();
+ video_clear();
state->paint(state->gui_id, t);
}
}
void st_timer(float dt)
{
+ if (!state_drawn)
+ return;
+
state_time += dt;
if (state && state->timer)