Menu/in-game-menu logic.

This commit is contained in:
Themaister 2012-01-20 19:29:26 +01:00
parent 057d29bea1
commit 2089521856
3 changed files with 8 additions and 2 deletions

View File

@ -174,12 +174,14 @@ struct console_settings
{
bool block_config_read;
bool return_to_multiman_enable;
uint32_t * supported_resolutions;
uint32_t *supported_resolutions;
uint32_t supported_resolutions_count;
uint32_t current_resolution_index;
uint32_t current_resolution_id;
uint32_t initial_resolution_id;
bool screenshots_enable;
bool in_game_menu;
};
#endif

View File

@ -259,7 +259,8 @@ begin_loop:
if(mode_switch == MODE_EMULATION)
{
while(ssnes_main_iterate());
ssnes_main_deinit();
// TODO: Check here if g_console.in_game_menu is set and act accordingly.
ssnes_main_deinit();
}
else if(mode_switch == MODE_MENU)
{

View File

@ -143,6 +143,9 @@ static bool ps3_key_pressed(void *data, int key)
return (CTRL_RSTICK_LEFT(state[0]) && CTRL_R2(state[0]));
case SSNES_REWIND:
return CTRL_RSTICK_DOWN(state[0]) && CTRL_R2(~state[0]);
case SSNES_QUIT_KEY:
g_console.in_game_menu = CTRL_R3(state[0]) && !CTRL_L3(state[0]);
return CTRL_R3(state[0]);
default:
return false;
}