mirror of
https://github.com/libretro/RetroArch
synced 2025-03-30 16:20:27 +00:00
(Platform context) Unique names per platform instance
This commit is contained in:
parent
3e667a8c07
commit
90b7589b5d
@ -67,7 +67,7 @@ static void find_and_set_first_file(void)
|
||||
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
|
||||
}
|
||||
|
||||
static void salamander_init(void)
|
||||
static void frontend_gx_salamander_init(void)
|
||||
{
|
||||
char tmp_str[512] = {0};
|
||||
bool config_file_exists;
|
||||
@ -219,7 +219,7 @@ int gx_logger_file(struct _reent *r, int fd, const char *ptr, size_t len)
|
||||
extern char gx_rom_path[PATH_MAX];
|
||||
#endif
|
||||
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
static void frontend_gx_get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
g_extern.verbose = true;
|
||||
@ -262,7 +262,7 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
|
||||
extern void __exception_setreload(int t);
|
||||
|
||||
static void system_init(void *data)
|
||||
static void frontend_gx_init(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifdef HW_RVL
|
||||
@ -302,26 +302,29 @@ static void system_init(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game);
|
||||
static void frontend_gx_exec(const char *path, bool should_load_game);
|
||||
|
||||
static void system_exitspawn(void)
|
||||
static void frontend_gx_exitspawn(void)
|
||||
{
|
||||
char boot_dol[PATH_MAX];
|
||||
|
||||
(void)boot_dol;
|
||||
|
||||
#if defined(IS_SALAMANDER)
|
||||
system_exec(libretro_path, gx_rom_path[0] != '\0' ? true : false);
|
||||
frontend_gx_exec(libretro_path, gx_rom_path[0] != '\0' ? true : false);
|
||||
#elif defined(HW_RVL)
|
||||
bool should_load_game = false;
|
||||
if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
|
||||
should_load_game = true;
|
||||
|
||||
system_exec(g_settings.libretro, should_load_game);
|
||||
frontend_gx_exec(g_settings.libretro, should_load_game);
|
||||
// direct loading failed (out of memory), try to jump to salamander then load the correct core
|
||||
char boot_dol[PATH_MAX];
|
||||
fill_pathname_join(boot_dol, default_paths.core_dir, "boot.dol", sizeof(boot_dol));
|
||||
system_exec(boot_dol, should_load_game);
|
||||
frontend_gx_exec(boot_dol, should_load_game);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void system_deinit(void *data)
|
||||
static void frontend_gx_deinit(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifndef IS_SALAMANDER
|
||||
@ -335,7 +338,7 @@ static void system_deinit(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
static int frontend_gx_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@ -359,7 +362,7 @@ static int system_process_args(int argc, char *argv[], void *args)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game)
|
||||
static void frontend_gx_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
#ifdef HW_RVL
|
||||
system_exec_wii(path, should_load_game);
|
||||
@ -376,17 +379,17 @@ static int frontend_gx_get_rating(void)
|
||||
}
|
||||
|
||||
const frontend_ctx_driver_t frontend_ctx_gx = {
|
||||
get_environment_settings, /* get_environment_settings */
|
||||
system_init, /* init */
|
||||
system_deinit, /* deinit */
|
||||
system_exitspawn, /* exitspawn */
|
||||
system_process_args, /* process_args */
|
||||
frontend_gx_get_environment_settings, /* get_environment_settings */
|
||||
frontend_gx_init, /* init */
|
||||
frontend_gx_deinit, /* deinit */
|
||||
frontend_gx_exitspawn, /* exitspawn */
|
||||
frontend_gx_process_args, /* process_args */
|
||||
NULL, /* process_events */
|
||||
system_exec, /* exec */
|
||||
frontend_gx_exec, /* exec */
|
||||
NULL, /* shutdown */
|
||||
frontend_gx_get_rating, /* get_rating */
|
||||
"gx",
|
||||
#ifdef IS_SALAMANDER
|
||||
salamander_init,
|
||||
frontend_gx_salamander_init,
|
||||
#endif
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ static void find_and_set_first_file(void)
|
||||
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
|
||||
}
|
||||
|
||||
static void salamander_init(void)
|
||||
static void frontend_ps3_salamander_init(void)
|
||||
{
|
||||
CellPadData pad_data;
|
||||
cellPadInit(7);
|
||||
@ -162,7 +162,7 @@ static void callback_sysutil_exit(uint64_t status, uint64_t param, void *userdat
|
||||
}
|
||||
#endif
|
||||
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
static void frontend_ps3_get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)args;
|
||||
#ifndef IS_SALAMANDER
|
||||
@ -264,7 +264,7 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
}
|
||||
}
|
||||
|
||||
static void system_init(void *data)
|
||||
static void frontend_ps3_init(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifdef HAVE_SYSUTILS
|
||||
@ -322,7 +322,7 @@ static void system_init(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
static int frontend_ps3_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
if (argc > 1)
|
||||
@ -336,7 +336,7 @@ static int system_process_args(int argc, char *argv[], void *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void system_deinit(void *data)
|
||||
static void frontend_ps3_deinit(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#ifndef IS_SALAMANDER
|
||||
@ -368,14 +368,14 @@ static void system_deinit(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game);
|
||||
static void frontend_ps3_exec(const char *path, bool should_load_game);
|
||||
|
||||
static void system_exitspawn(void)
|
||||
static void frontend_ps3_exitspawn(void)
|
||||
{
|
||||
#ifdef HAVE_RARCH_EXEC
|
||||
|
||||
#ifdef IS_SALAMANDER
|
||||
system_exec(libretro_path, false);
|
||||
frontend_ps3_exec(libretro_path, false);
|
||||
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_SYSUTIL_GAME);
|
||||
cellSysmoduleLoadModule(CELL_SYSMODULE_FS);
|
||||
@ -395,7 +395,7 @@ static void system_exitspawn(void)
|
||||
if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
|
||||
should_load_game = true;
|
||||
|
||||
system_exec(core_launch, should_load_game);
|
||||
frontend_ps3_exec(core_launch, should_load_game);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@ -413,7 +413,7 @@ static void system_exitspawn(void)
|
||||
|
||||
#include "../../retroarch_logger.h"
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game)
|
||||
static void frontend_ps3_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
(void)should_load_game;
|
||||
|
||||
@ -454,23 +454,23 @@ static void system_exec(const char *path, bool should_load_game)
|
||||
cellSysmoduleUnloadModule(CELL_SYSMODULE_NET);
|
||||
}
|
||||
|
||||
static int frontend_xdk_get_rating(void)
|
||||
static int frontend_ps3_get_rating(void)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
const frontend_ctx_driver_t frontend_ctx_ps3 = {
|
||||
get_environment_settings, /* get_environment_settings */
|
||||
system_init, /* init */
|
||||
system_deinit, /* deinit */
|
||||
system_exitspawn, /* exitspawn */
|
||||
system_process_args, /* process_args */
|
||||
frontend_ps3_get_environment_settings, /* get_environment_settings */
|
||||
frontend_ps3_init, /* init */
|
||||
frontend_ps3_deinit, /* deinit */
|
||||
frontend_ps3_exitspawn, /* exitspawn */
|
||||
frontend_ps3_process_args, /* process_args */
|
||||
NULL, /* process_events */
|
||||
system_exec, /* exec */
|
||||
frontend_ps3_exec, /* exec */
|
||||
NULL, /* shutdown */
|
||||
frontend_ps3_get_rating, /* get_rating */
|
||||
"ps3",
|
||||
#ifdef IS_SALAMANDER
|
||||
salamander_init,
|
||||
frontend_ps3_salamander_init,
|
||||
#endif
|
||||
};
|
||||
|
@ -44,7 +44,7 @@ static int exit_callback(int arg1, int arg2, void *common)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
static void frontend_psp_get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)args;
|
||||
#ifndef IS_SALAMANDER
|
||||
@ -88,7 +88,7 @@ static int setup_callback(void)
|
||||
return thread_id;
|
||||
}
|
||||
|
||||
static void system_init(void *data)
|
||||
static void frontend_psp_init(void *data)
|
||||
{
|
||||
(void)data;
|
||||
//initialize debug screen
|
||||
@ -101,13 +101,13 @@ static void system_init(void *data)
|
||||
scePowerSetClockFrequency(333,333,166);
|
||||
}
|
||||
|
||||
static void system_deinit(void *data)
|
||||
static void frontend_psp_deinit(void *data)
|
||||
{
|
||||
(void)data;
|
||||
sceKernelExitGame();
|
||||
}
|
||||
|
||||
static int psp_process_args(int argc, char *argv[], void *args)
|
||||
static int frontend_psp_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)argc;
|
||||
(void)args;
|
||||
@ -128,11 +128,11 @@ static int frontend_psp_get_rating(void)
|
||||
}
|
||||
|
||||
const frontend_ctx_driver_t frontend_ctx_psp = {
|
||||
get_environment_settings, /* get_environment_settings */
|
||||
system_init, /* init */
|
||||
system_deinit, /* deinit */
|
||||
frontend_psp_get_environment_settings, /* get_environment_settings */
|
||||
frontend_psp_init, /* init */
|
||||
frontend_psp_deinit, /* deinit */
|
||||
NULL, /* exitspawn */
|
||||
psp_process_args, /* process_args */
|
||||
frontend_psp_process_args, /* process_args */
|
||||
NULL, /* process_events */
|
||||
NULL, /* exec */
|
||||
NULL, /* shutdown */
|
||||
|
@ -59,7 +59,7 @@ static void find_and_set_first_file(void)
|
||||
RARCH_ERR("Failed last fallback - RetroArch Salamander will exit.\n");
|
||||
}
|
||||
|
||||
static void salamander_init(void)
|
||||
static void frontend_xdk_salamander_init(void)
|
||||
{
|
||||
XINPUT_STATE state;
|
||||
(void)state;
|
||||
@ -178,7 +178,7 @@ static HRESULT xbox_io_unmount(char *szDrive)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
static void frontend_xdk_get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
HRESULT ret;
|
||||
(void)ret;
|
||||
@ -250,7 +250,7 @@ static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
#endif
|
||||
}
|
||||
|
||||
static void system_init(void *data)
|
||||
static void frontend_xdk_init(void *data)
|
||||
{
|
||||
(void)data;
|
||||
#if defined(_XBOX1) && !defined(IS_SALAMANDER)
|
||||
@ -264,7 +264,7 @@ static void system_init(void *data)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
static int frontend_xdk_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
@ -303,18 +303,18 @@ static int system_process_args(int argc, char *argv[], void *args)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game);
|
||||
static void frontend_xdk_exec(const char *path, bool should_load_game);
|
||||
|
||||
static void system_exitspawn(void)
|
||||
static void frontend_xdk_exitspawn(void)
|
||||
{
|
||||
#ifdef IS_SALAMANDER
|
||||
system_exec(libretro_path, false);
|
||||
frontend_xdk_exec(libretro_path, false);
|
||||
#else
|
||||
bool should_load_game = false;
|
||||
if (g_extern.lifecycle_state & (1ULL << MODE_EXITSPAWN_START_GAME))
|
||||
should_load_game = true;
|
||||
|
||||
system_exec(g_settings.libretro, should_load_game);
|
||||
frontend_xdk_exec(g_settings.libretro, should_load_game);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -324,7 +324,7 @@ static void system_exitspawn(void)
|
||||
|
||||
#include "../../retroarch_logger.h"
|
||||
|
||||
static void system_exec(const char *path, bool should_load_game)
|
||||
static void frontend_xdk_exec(const char *path, bool should_load_game)
|
||||
{
|
||||
(void)should_load_game;
|
||||
|
||||
@ -366,17 +366,17 @@ static int frontend_xdk_get_rating(void)
|
||||
}
|
||||
|
||||
const frontend_ctx_driver_t frontend_ctx_xdk = {
|
||||
get_environment_settings, /* get_environment_settings */
|
||||
system_init, /* init */
|
||||
frontend_xdk_get_environment_settings, /* get_environment_settings */
|
||||
frontend_xdk_init, /* init */
|
||||
NULL, /* deinit */
|
||||
system_exitspawn, /* exitspawn */
|
||||
system_process_args, /* process_args */
|
||||
frontend_xdk_exitspawn, /* exitspawn */
|
||||
frontend_xdk_process_args, /* process_args */
|
||||
NULL, /* process_events */
|
||||
system_exec, /* exec */
|
||||
frontend_xdk_exec, /* exec */
|
||||
NULL, /* shutdown */
|
||||
frontend_xdk_get_rating, /* get_rating */
|
||||
"xdk",
|
||||
#ifdef IS_SALAMANDER
|
||||
salamander_init,
|
||||
frontend_xdk_salamander_init,
|
||||
#endif
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user