mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
(SSNES_CONSOLE) Introduce HAVE_SSNES_MAIN_WRAP define
This commit is contained in:
parent
782e8b8da9
commit
79737aecf3
17
360/main.c
17
360/main.c
@ -406,22 +406,7 @@ begin_loop:
|
|||||||
else if(g_console.mode_switch == MODE_MENU)
|
else if(g_console.mode_switch == MODE_MENU)
|
||||||
{
|
{
|
||||||
menu_loop();
|
menu_loop();
|
||||||
|
ssnes_startup(SYS_CONFIG_FILE);
|
||||||
if(g_console.initialize_ssnes_enable)
|
|
||||||
{
|
|
||||||
if(g_console.emulator_initialized)
|
|
||||||
ssnes_main_deinit();
|
|
||||||
|
|
||||||
struct ssnes_main_wrap args = {0};
|
|
||||||
|
|
||||||
args.verbose = g_extern.verbose;
|
|
||||||
args.config_path = SYS_CONFIG_FILE;
|
|
||||||
args.rom_path = g_console.rom_path;
|
|
||||||
|
|
||||||
int init_ret = ssnes_main_init_wrap(&args);
|
|
||||||
g_console.emulator_initialized = 1;
|
|
||||||
g_console.initialize_ssnes_enable = 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto begin_shutdown;
|
goto begin_shutdown;
|
||||||
|
@ -68,7 +68,7 @@ endif
|
|||||||
|
|
||||||
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lretro -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
PPU_LDLIBS = -ldbgfont $(GL_LIBS) -lretro -lcgc -lgcm_cmd -lgcm_sys_stub -lresc_stub -lm -lio_stub -lfs_stub -lsysutil_stub -lsysutil_game_stub -lsysutil_screenshot_stub -lsysutil_np_stub -lpngdec_stub -ljpgdec_stub -lsysmodule_stub -laudio_stub -lnet_stub -lnetctl_stub -lpthread
|
||||||
|
|
||||||
DEFINES += -DSSNES_CONSOLE -DHAVE_OPENGL -DHAVE_CG -DHAVE_FBO -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(SSNES_VERSION)\" -Dmain=ssnes_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
DEFINES += -DSSNES_CONSOLE -DHAVE_OPENGL -DHAVE_CG -DHAVE_FBO -DHAVE_SSNES_MAIN_WRAP -DHAVE_LIBRETRO_MANAGEMENT -DHAVE_RSOUND -DHAVE_ZLIB -D__CELLOS_LV2__ -DHAVE_CONFIGFILE=1 -DHAVE_NETPLAY=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_GRIFFIN=1 -DPACKAGE_VERSION=\"$(SSNES_VERSION)\" -Dmain=ssnes_main -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
|
||||||
|
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
PPU_OPTIMIZE_LV := -O0 -g
|
PPU_OPTIMIZE_LV := -O0 -g
|
||||||
|
@ -620,3 +620,41 @@ bool ssnes_manage_libretro_core(const char *full_path, const char *path, const c
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*============================================================
|
||||||
|
SSNES MAIN WRAP
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
#ifdef HAVE_SSNES_MAIN_WRAP
|
||||||
|
|
||||||
|
void ssnes_startup (const char * config_path)
|
||||||
|
{
|
||||||
|
if(g_console.initialize_ssnes_enable)
|
||||||
|
{
|
||||||
|
if(g_console.emulator_initialized)
|
||||||
|
ssnes_main_deinit();
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
struct ssnes_main_wrap args = {0};
|
||||||
|
|
||||||
|
args.verbose = g_extern.verbose;
|
||||||
|
args.config_path = config_path;
|
||||||
|
args.sram_path = g_console.default_sram_dir_enable ? g_console.default_sram_dir : NULL,
|
||||||
|
args.state_path = g_console.default_savestate_dir_enable ? g_console.default_savestate_dir : NULL,
|
||||||
|
args.rom_path = g_console.rom_path;
|
||||||
|
#else
|
||||||
|
struct ssnes_main_wrap args = {
|
||||||
|
.verbose = g_extern.verbose,
|
||||||
|
.config_path = config_path,
|
||||||
|
.sram_path = g_console.default_sram_dir_enable ? g_console.default_sram_dir : NULL,
|
||||||
|
.state_path = g_console.default_savestate_dir_enable ? g_console.default_savestate_dir : NULL,
|
||||||
|
.rom_path = g_console.rom_path
|
||||||
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
|
int init_ret = ssnes_main_init_wrap(&args);
|
||||||
|
g_console.emulator_initialized = 1;
|
||||||
|
g_console.initialize_ssnes_enable = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
@ -86,3 +86,11 @@ bool ssnes_manage_libretro_core(const char *full_path, const char *path, const c
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*============================================================
|
||||||
|
SSNES MAIN WRAP
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
#ifdef HAVE_SSNES_MAIN_WRAP
|
||||||
|
void ssnes_startup (const char * config_path);
|
||||||
|
#endif
|
||||||
|
@ -112,7 +112,7 @@
|
|||||||
<MinimalRebuild>true</MinimalRebuild>
|
<MinimalRebuild>true</MinimalRebuild>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.5";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_XBOX;PACKAGE_VERSION="0.9.5";%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -150,7 +150,7 @@
|
|||||||
<PREfast>AnalyzeOnly</PREfast>
|
<PREfast>AnalyzeOnly</PREfast>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_DEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;SSNES_CONSOLE;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -189,7 +189,7 @@
|
|||||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
<CallAttributedProfiling>Callcap</CallAttributedProfiling>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
@ -233,7 +233,7 @@
|
|||||||
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_XBOX;PROFILE;FASTCAP;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;HAVE_CONFIGFILE;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@ -274,7 +274,7 @@
|
|||||||
<ExceptionHandling>false</ExceptionHandling>
|
<ExceptionHandling>false</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_XBOX;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;main=ssnes_main;SSNES_CONSOLE=1;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
@ -315,7 +315,7 @@
|
|||||||
<ExceptionHandling>false</ExceptionHandling>
|
<ExceptionHandling>false</ExceptionHandling>
|
||||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||||
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
<PreprocessorDefinitions>NDEBUG;_XBOX;LTCG;%(PreprocessorDefinitions);PACKAGE_VERSION="0.9.5";_CRT_SECURE_NO_WARNINGS;SSNES_CONSOLE;main=ssnes_main;HAVE_CONFIGFILE;HAVE_NETPLAY;HAVE_SOCKET_LEGACY;HAVE_ZLIB;HAVE_SSNES_MAIN_WRAP;HAVE_LIBRETRO_MANAGEMENT;D3DCOMPILE_USEVOIDS;HAVE_GRIFFIN</PreprocessorDefinitions>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<Link>
|
<Link>
|
||||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||||
|
26
ps3/main.c
26
ps3/main.c
@ -436,28 +436,6 @@ static void get_environment_settings(int argc, char *argv[])
|
|||||||
g_extern.verbose = false;
|
g_extern.verbose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void startup_ssnes(void)
|
|
||||||
{
|
|
||||||
if(g_console.initialize_ssnes_enable)
|
|
||||||
{
|
|
||||||
if(g_console.emulator_initialized)
|
|
||||||
ssnes_main_deinit();
|
|
||||||
|
|
||||||
struct ssnes_main_wrap args = {
|
|
||||||
.verbose = g_extern.verbose,
|
|
||||||
.config_path = SYS_CONFIG_FILE,
|
|
||||||
.sram_path = g_console.default_sram_dir_enable ? g_console.default_sram_dir : NULL,
|
|
||||||
.state_path = g_console.default_savestate_dir_enable ? g_console.default_savestate_dir : NULL,
|
|
||||||
.rom_path = g_console.rom_path
|
|
||||||
};
|
|
||||||
|
|
||||||
int init_ret = ssnes_main_init_wrap(&args);
|
|
||||||
g_console.emulator_initialized = 1;
|
|
||||||
g_console.initialize_ssnes_enable = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
SSNES_LOG("Registering system utility callback...\n");
|
SSNES_LOG("Registering system utility callback...\n");
|
||||||
@ -527,7 +505,7 @@ int main(int argc, char *argv[])
|
|||||||
strncpy(g_console.rom_path, argv[1], sizeof(g_console.rom_path));
|
strncpy(g_console.rom_path, argv[1], sizeof(g_console.rom_path));
|
||||||
g_console.initialize_ssnes_enable = 1;
|
g_console.initialize_ssnes_enable = 1;
|
||||||
g_console.mode_switch = MODE_EMULATION;
|
g_console.mode_switch = MODE_EMULATION;
|
||||||
startup_ssnes();
|
ssnes_startup(SYS_CONFIG_FILE);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,7 +523,7 @@ begin_loop:
|
|||||||
else if(g_console.mode_switch == MODE_MENU)
|
else if(g_console.mode_switch == MODE_MENU)
|
||||||
{
|
{
|
||||||
menu_loop();
|
menu_loop();
|
||||||
startup_ssnes();
|
ssnes_startup(SYS_CONFIG_FILE);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto begin_shutdown;
|
goto begin_shutdown;
|
||||||
|
3
ssnes.c
3
ssnes.c
@ -2483,7 +2483,7 @@ void ssnes_main_deinit(void)
|
|||||||
uninit_libretro_sym();
|
uninit_libretro_sym();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(SSNES_CONSOLE) || defined(GEKKO)
|
#ifndef HAVE_SSNES_MAIN_WRAP
|
||||||
// Consoles use the higher level API.
|
// Consoles use the higher level API.
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
@ -2495,4 +2495,3 @@ int main(int argc, char *argv[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user