mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-15 23:06:40 +00:00
(360) Moved some state variables to g_console struct
This commit is contained in:
parent
3a33c5e1ec
commit
979b54178e
18
360/main.c
18
360/main.c
@ -52,9 +52,7 @@ char SYS_CONFIG_FILE[MAX_PATH_LENGTH];
|
||||
|
||||
extern "C" int __stdcall ObCreateSymbolicLink( STRING*, STRING*);
|
||||
|
||||
bool init_ssnes = false;
|
||||
int Mounted[20];
|
||||
uint32_t g_emulator_initialized = 0;
|
||||
|
||||
int ssnes_main(int argc, char *argv[]);
|
||||
|
||||
@ -131,13 +129,19 @@ static void set_default_settings (void)
|
||||
{
|
||||
//g_settings
|
||||
g_settings.rewind_enable = false;
|
||||
g_settings.video.vsync = true;
|
||||
|
||||
//g_console
|
||||
g_console.block_config_read = true;
|
||||
g_console.throttle_enable = true;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
g_console.emulator_initialized = 0;
|
||||
g_console.mode_switch = MODE_MENU;
|
||||
strlcpy(g_console.default_rom_startup_dir, "game:\\roms\\", sizeof(g_console.default_rom_startup_dir));
|
||||
|
||||
//g_extern
|
||||
g_extern.state_slot = 0;
|
||||
g_extern.audio_data.mute = 0;
|
||||
g_extern.verbose = true;
|
||||
}
|
||||
|
||||
@ -167,8 +171,10 @@ static void init_settings (void)
|
||||
|
||||
// g_settings
|
||||
CONFIG_GET_BOOL(rewind_enable, "rewind_enable");
|
||||
CONFIG_GET_BOOL(video.vsync, "video_vsync");
|
||||
|
||||
// g_console
|
||||
CONFIG_GET_BOOL_CONSOLE(throttle_enable, "throttle_enable");
|
||||
CONFIG_GET_STRING_CONSOLE(default_rom_startup_dir, "default_rom_startup_dir");
|
||||
|
||||
// g_extern
|
||||
@ -292,9 +298,9 @@ begin_loop:
|
||||
{
|
||||
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 = {0};
|
||||
@ -304,8 +310,8 @@ begin_loop:
|
||||
args.rom_path = g_console.rom_path;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -130,7 +130,7 @@ HRESULT CSSNESFileBrowser::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
sprintf(g_console.rom_path, "%s%s", g_console.default_rom_startup_dir, strbuffer);
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EMULATION;
|
||||
init_ssnes = 1;
|
||||
g_console.initialize_ssnes_enable = 1;
|
||||
}
|
||||
else if(browser.cur[index].d_type == FILE_ATTRIBUTE_DIRECTORY)
|
||||
{
|
||||
@ -202,7 +202,7 @@ HRESULT CSSNESMain::OnNotifyPress( HXUIOBJ hObjPressed, BOOL& bHandled )
|
||||
{
|
||||
g_console.menu_enable = false;
|
||||
g_console.mode_switch = MODE_EXIT;
|
||||
init_ssnes = 0;
|
||||
g_console.initialize_ssnes_enable = false;
|
||||
}
|
||||
|
||||
bHandled = TRUE;
|
||||
|
@ -24,5 +24,3 @@ enum
|
||||
MODE_MENU,
|
||||
MODE_EXIT
|
||||
};
|
||||
|
||||
extern bool init_ssnes;
|
||||
|
@ -173,6 +173,7 @@ struct console_settings
|
||||
bool block_config_read;
|
||||
bool default_sram_dir_enable;
|
||||
bool default_savestate_dir_enable;
|
||||
bool initialize_ssnes_enable;
|
||||
bool ingame_menu_enable;
|
||||
bool menu_enable;
|
||||
bool overscan_enable;
|
||||
@ -182,6 +183,7 @@ struct console_settings
|
||||
bool triple_buffering_enable;
|
||||
float overscan_amount;
|
||||
uint32_t aspect_ratio_index;
|
||||
uint32_t emulator_initialized;
|
||||
uint32_t screen_orientation;
|
||||
uint32_t current_resolution_index;
|
||||
uint32_t current_resolution_id;
|
||||
|
Loading…
Reference in New Issue
Block a user