From 64728e38a424fa07b0e92a23bf16baaeb67323c3 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Thu, 9 Feb 2012 14:25:13 +0100 Subject: [PATCH] (PS3) Use new members in g_console --- ps3/main.c | 16 ++++++++-------- ps3/menu.c | 6 +++--- ps3/shared.h | 2 -- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ps3/main.c b/ps3/main.c index 06ce7429be..8e20ffc9d3 100644 --- a/ps3/main.c +++ b/ps3/main.c @@ -45,11 +45,8 @@ #define EMULATOR_CONTENT_DIR "SSNE10000" -uint32_t g_emulator_initialized = 0; - char special_action_msg[256]; /* message which should be overlaid on top of the screen*/ uint32_t special_action_msg_expired; /* time at which the message no longer needs to be overlaid onscreen*/ -bool init_ssnes = false; uint64_t ingame_menu_item = 0; char contentInfoPath[MAX_PATH_LENGTH]; @@ -157,11 +154,14 @@ static void set_default_settings(void) // g_console g_console.block_config_read = true; + g_console.emulator_initialized = 0; g_console.screenshots_enable = false; g_console.throttle_enable = true; + g_console.initialize_ssnes_enable = false; g_console.triple_buffering_enable = true; g_console.default_savestate_dir_enable = false; g_console.default_sram_dir_enable = false; + g_console.mode_switch = MODE_MENU; g_console.screen_orientation = ORIENTATION_NORMAL; g_console.current_resolution_id = CELL_VIDEO_OUT_RESOLUTION_UNDEFINED; strlcpy(g_console.default_rom_startup_dir, "/", sizeof(g_console.default_rom_startup_dir)); @@ -286,7 +286,7 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat g_quitting = true; g_console.ingame_menu_enable = false; g_console.mode_switch = MODE_EXIT; - if(g_emulator_initialized) + if(g_console.emulator_initialized) ssnes_main_deinit(); break; } @@ -810,9 +810,9 @@ begin_loop: else if(g_console.mode_switch == MODE_MENU) { menu_loop(); - if(init_ssnes) + if(g_console.initialize_ssnes_enable) { - if(g_emulator_initialized) + if(g_console.emulator_initialized) ssnes_main_deinit(); struct ssnes_main_wrap args = { @@ -824,8 +824,8 @@ begin_loop: }; int init_ret = ssnes_main_init_wrap(&args); - g_emulator_initialized = 1; - init_ssnes = 0; + g_console.emulator_initialized = 1; + g_console.initialize_ssnes_enable = 0; } } #ifdef MULTIMAN_SUPPORT diff --git a/ps3/menu.c b/ps3/menu.c index 6e0abe398a..b326156ecc 100644 --- a/ps3/menu.c +++ b/ps3/menu.c @@ -279,7 +279,7 @@ static void browser_update(filebrowser_t * b) if (CTRL_L3(state) && CTRL_R3(state)) { /* if a rom is loaded then resume it */ - if (g_emulator_initialized) + if (g_console.emulator_initialized) { g_console.menu_enable = false; g_console.mode_switch = MODE_EMULATION; @@ -1506,7 +1506,7 @@ static void select_setting(menu * menu_obj) if (CTRL_L3(state) && CTRL_R3(state)) { - if (g_emulator_initialized) + if (g_console.emulator_initialized) { g_console.menu_enable = false; g_console.mode_switch = MODE_EMULATION; @@ -1589,7 +1589,7 @@ static void select_rom(void) g_console.menu_enable = false; snprintf(g_console.rom_path, sizeof(g_console.rom_path), "%s/%s", FILEBROWSER_GET_CURRENT_DIRECTORY_NAME(browser), FILEBROWSER_GET_CURRENT_FILENAME(browser)); - init_ssnes = 1; + g_console.initialize_ssnes_enable = 1; g_console.mode_switch = MODE_EMULATION; old_state = state; diff --git a/ps3/shared.h b/ps3/shared.h index 1b7d7c6051..594c6c58ab 100644 --- a/ps3/shared.h +++ b/ps3/shared.h @@ -57,10 +57,8 @@ enum { #define MENU_ITEM_LAST MENU_ITEM_RETURN_TO_XMB+1 extern char special_action_msg[256]; -extern uint32_t g_emulator_initialized; extern uint32_t special_action_msg_expired; extern unsigned g_frame_count; -extern bool init_ssnes; extern bool g_quitting; extern char contentInfoPath[MAX_PATH_LENGTH];