From a752db392f1f0d6711ea150c0a06eba38d0e13fc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 14 Sep 2014 07:53:18 +0200 Subject: [PATCH] Revert "Do life cycle state checking outside of graphics driver for" This reverts commit 06bea05634acdb7a80bb7945dd19c8bac240df2b. --- gfx/d3d/d3d.cpp | 3 ++- gfx/gl.c | 3 ++- gfx/sdl2_gfx.c | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/gfx/d3d/d3d.cpp b/gfx/d3d/d3d.cpp index fc8601d96f..2c70586c2c 100644 --- a/gfx/d3d/d3d.cpp +++ b/gfx/d3d/d3d.cpp @@ -1586,7 +1586,8 @@ static bool d3d_frame(void *data, const void *frame, #endif #ifdef HAVE_MENU - if (driver.menu_ctx && driver.menu_ctx->frame) + if (g_extern.lifecycle_state & (1ULL << MODE_MENU) + && driver.menu_ctx && driver.menu_ctx->frame) driver.menu_ctx->frame(); #ifdef _XBOX diff --git a/gfx/gl.c b/gfx/gl.c index f42d4a070c..fe85f30775 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1592,7 +1592,8 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei gl_set_prev_texture(gl, &tex_info); #if defined(HAVE_MENU) - if (driver.menu_ctx && driver.menu_ctx->frame) + if ((g_extern.lifecycle_state & (1ULL << MODE_MENU)) + && driver.menu_ctx && driver.menu_ctx->frame) driver.menu_ctx->frame(); if (gl->menu_texture_enable) diff --git a/gfx/sdl2_gfx.c b/gfx/sdl2_gfx.c index a0385fb96c..6de0e2e85e 100644 --- a/gfx/sdl2_gfx.c +++ b/gfx/sdl2_gfx.c @@ -490,7 +490,7 @@ static bool sdl2_gfx_frame(void *data, const void *frame, unsigned width, SDL_RenderCopyEx(vid->renderer, vid->frame.tex, NULL, NULL, vid->rotation, NULL, SDL_FLIP_NONE); #ifdef HAVE_MENU - if (driver.menu_ctx && driver.menu_ctx->frame) + if (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame) driver.menu_ctx->frame(); #endif