Take out MODE_MENu - and introduce g_extern.is_menu

This commit is contained in:
twinaphex 2014-09-25 06:33:28 +02:00
parent 15f82cb477
commit 00e605d9ba
9 changed files with 13 additions and 14 deletions

View File

@ -281,8 +281,8 @@ static void rgui_render(void)
size_t begin = 0;
size_t end;
if (driver.menu->need_refresh &&
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
if (driver.menu->need_refresh
&& g_extern.is_menu
&& !driver.menu->msg_force)
return;

View File

@ -134,8 +134,7 @@ static void rmenu_render(void)
return;
}
if (menu->need_refresh &&
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
if (menu->need_refresh && g_extern.is_menu
&& !menu->msg_force)
return;

View File

@ -372,8 +372,7 @@ static void rmenu_xui_render(void)
unsigned menu_type = 0;
if (!driver.menu || driver.menu->need_refresh &&
(g_extern.lifecycle_state & (1ULL << MODE_MENU))
&& !driver.menu->msg_force)
g_extern.is_menu && !driver.menu->msg_force)
return;
begin = driver.menu->selection_ptr;

View File

@ -148,7 +148,6 @@ enum action_state
enum menu_enums
{
MODE_NONE = 0,
MODE_MENU,
MODE_MENU_WIDESCREEN,
MODE_MENU_HD,
MODE_EXTLAUNCH_MULTIMAN,
@ -635,6 +634,7 @@ struct global
/* Pausing support. */
bool is_paused;
bool is_oneshot;
bool is_menu;
bool is_slowmotion;
/* Turbo support. */

View File

@ -1596,7 +1596,7 @@ static bool d3d_frame(void *data, const void *frame,
#endif
#ifdef HAVE_MENU
if (g_extern.lifecycle_state & (1ULL << MODE_MENU)
if (g_extern.is_menu
&& driver.menu_ctx && driver.menu_ctx->frame)
driver.menu_ctx->frame();

View File

@ -1595,7 +1595,7 @@ 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 ((g_extern.lifecycle_state & (1ULL << MODE_MENU))
if (g_extern.is_menu
&& driver.menu_ctx && driver.menu_ctx->frame)
driver.menu_ctx->frame();

View File

@ -490,7 +490,8 @@ 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 (g_extern.lifecycle_state & (1ULL << MODE_MENU) && driver.menu_ctx && driver.menu_ctx->frame)
if (g_extern.is_menu
&& driver.menu_ctx && driver.menu_ctx->frame)
driver.menu_ctx->frame();
#endif

View File

@ -109,7 +109,7 @@ static void ps3_input_poll(void *data)
*state_cur |= (state_tmp.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_TRIANGLE) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_X) : 0;
*state_cur |= (state_tmp.button[CELL_PAD_BTN_OFFSET_DIGITAL2] & CELL_PAD_CTRL_SQUARE) ? (1ULL << RETRO_DEVICE_ID_JOYPAD_Y) : 0;
if (*lifecycle_state & (1ULL << MODE_MENU))
if (g_extern.is_menu)
{
int value = 0;
if (cellSysutilGetSystemParamInt(CELL_SYSUTIL_SYSTEMPARAM_ID_ENTER_BUTTON_ASSIGN, &value) == 0)

View File

@ -2849,10 +2849,10 @@ void rarch_main_set_state(unsigned cmd)
#endif
break;
case RARCH_ACTION_STATE_MENU_RUNNING:
g_extern.lifecycle_state |= (1ULL << MODE_MENU);
g_extern.is_menu = true;
break;
case RARCH_ACTION_STATE_MENU_RUNNING_FINISHED:
g_extern.lifecycle_state &= ~(1ULL << MODE_MENU);
g_extern.is_menu = false;
break;
case RARCH_ACTION_STATE_EXITSPAWN:
g_extern.lifecycle_state |= (1ULL << MODE_EXITSPAWN);
@ -3232,7 +3232,7 @@ bool rarch_main_iterate(void)
!driver.video->alive(driver.video_data))
return false;
if (g_extern.lifecycle_state & (1ULL << MODE_MENU))
if (g_extern.is_menu)
{
if (!menu_iterate(input, old_input, trigger_input))
{