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

@ -180,6 +180,8 @@ struct console_settings
uint32_t current_resolution_id;
uint32_t initial_resolution_id;
bool screenshots_enable;
bool in_game_menu;
};
#endif

View File

@ -259,6 +259,7 @@ begin_loop:
if(mode_switch == MODE_EMULATION)
{
while(ssnes_main_iterate());
// 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;
}