(RMenu/RGUI) Get rid of MODE_MENU_INGAME_EXIT

This commit is contained in:
twinaphex 2013-09-30 00:09:40 +02:00
parent c95689e8f0
commit 64dc9513ae
4 changed files with 5 additions and 26 deletions

View File

@ -119,9 +119,6 @@ int menu_set_settings(unsigned setting, unsigned action)
else
rarch_load_state();
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
#ifdef HAVE_RMENU
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
#endif
return -1;
}
else if (action == RGUI_ACTION_START)
@ -201,12 +198,9 @@ int menu_set_settings(unsigned setting, unsigned action)
}
break;
case RGUI_SETTINGS_RESUME_GAME:
if (action == RGUI_ACTION_OK && (g_extern.main_is_init))
if (action == RGUI_ACTION_OK)
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
#ifdef HAVE_RMENU
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
#endif
return -1;
}
break;
@ -214,9 +208,6 @@ int menu_set_settings(unsigned setting, unsigned action)
if (action == RGUI_ACTION_OK)
{
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
#ifdef HAVE_RMENU
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
#endif
return -1;
}
break;

View File

@ -1490,14 +1490,10 @@ int rgui_input_postprocess(void *data, uint64_t old_state)
g_extern.main_is_init &&
!g_extern.libretro_dummy)
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
ret = -1;
}
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME_EXIT))
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_INGAME_EXIT);
if (ret < 0)
{
unsigned type = 0;

View File

@ -1240,7 +1240,7 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
menu_stack_push(INGAME_MENU_SCREENSHOT, false);
break;
case INGAME_MENU_RETURN_TO_GAME:
return menu_set_settings(RGUI_SETTINGS_VIDEO_ROTATION, action);
return menu_set_settings(RGUI_SETTINGS_RESUME_GAME, action);
case INGAME_MENU_CHANGE_GAME:
if (action == RGUI_ACTION_OK)
menu_stack_push(FILE_BROWSER_MENU, false);
@ -1254,7 +1254,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
{
rarch_game_reset();
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
return -1;
}
break;
@ -1270,7 +1269,6 @@ static int set_setting_action(uint8_t menu_type, unsigned switchvalue, uint64_t
if (action == RGUI_ACTION_OK)
{
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXITSPAWN);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXITSPAWN_MULTIMAN);
return -1;
@ -1981,7 +1979,6 @@ static int select_setting(void *data, uint64_t action)
case RGUI_ACTION_CANCEL:
if (rgui->menu_type == INGAME_MENU)
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
return -1;
}
@ -2262,9 +2259,7 @@ int rgui_input_postprocess(void *data, uint64_t old_state)
if ((rgui->trigger_state & (1ULL << RARCH_MENU_TOGGLE)) &&
g_extern.main_is_init)
{
g_extern.lifecycle_mode_state |= (1ULL << MODE_MENU_INGAME_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_GAME);
ret = -1;
}
@ -2274,11 +2269,6 @@ int rgui_input_postprocess(void *data, uint64_t old_state)
if (quit)
ret = -1;
if (g_extern.lifecycle_mode_state & (1ULL << MODE_MENU_INGAME_EXIT))
{
menu_stack_pop(rgui->menu_type);
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_MENU_INGAME_EXIT);
}
return ret;
}
@ -2358,6 +2348,9 @@ static int rgui_iterate(void *data, unsigned action)
if (ret == 0)
render_text(rgui);
if (ret == -1)
menu_stack_pop(rgui->menu_type);
return ret;
}

View File

@ -113,7 +113,6 @@ enum menu_enums
MODE_MENU_WIDESCREEN,
MODE_MENU_HD,
MODE_MENU_PREINIT,
MODE_MENU_INGAME_EXIT,
MODE_INFO_DRAW,
MODE_FPS_DRAW,
MODE_EXTLAUNCH_MULTIMAN,