From 208952185674fd9edd0d184afa02e08bb86e69e8 Mon Sep 17 00:00:00 2001 From: Themaister Date: Fri, 20 Jan 2012 19:29:26 +0100 Subject: [PATCH] Menu/in-game-menu logic. --- general.h | 4 +++- ps3/main.c | 3 ++- ps3/ps3_input.c | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/general.h b/general.h index 84228c516b..12b0e7c4fb 100644 --- a/general.h +++ b/general.h @@ -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 diff --git a/ps3/main.c b/ps3/main.c index 2f58b000c0..42ee512f12 100644 --- a/ps3/main.c +++ b/ps3/main.c @@ -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) { diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index 6560b07471..3f36abebb1 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -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; }