Skip to content

Commit

Permalink
[ORBIS] Remove main
Browse files Browse the repository at this point in the history
  • Loading branch information
frangarcj committed Dec 31, 2018
1 parent 43b8763 commit 63044b2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
47 changes: 20 additions & 27 deletions frontend/drivers/platform_orbis.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,48 +72,41 @@ char user_path[512];

static enum frontend_fork orbis_fork_mode = FRONTEND_FORK_NONE;

#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char *argv[])
static void frontend_orbis_get_environment_settings(int *argc, char *argv[],
void *args, void *params_data)
{
unsigned i;
struct rarch_main_wrap *params = NULL;

(void)args;

#ifndef IS_SALAMANDER
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)
retro_main_log_file_init("host0:/temp/retroarch-log.txt");
#endif
#endif

int ret;

sceSystemServiceHideSplashScreen();


uintptr_t intptr=0;
sscanf(argv[1],"%p",&intptr);
argv[1] = NULL;
myConf=(OrbisGlobalConf *)intptr;
ret=ps4LinkInitWithConf(myConf->confLink);
if(!ret)
{
ps4LinkFinish();
return -1;
return;
}

orbisPadInitWithConf(myConf->confPad);
scePadClose(myConf->confPad->padHandle);

return rarch_main(argc, argv, NULL);
}

static void frontend_orbis_get_environment_settings(int *argc, char *argv[],
void *args, void *params_data)
{
unsigned i;
struct rarch_main_wrap *params = NULL;

(void)args;

#ifndef IS_SALAMANDER
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)
retro_main_log_file_init("host0:/temp/retroarch-log.txt");
#endif
#endif

strlcpy(eboot_path, "host0:/", sizeof(eboot_path));
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
strlcpy(user_path, "host0:/data/retroarch/", sizeof(user_path));
Expand Down Expand Up @@ -163,15 +156,15 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[],
params = (struct rarch_main_wrap*)params_data;
params->verbose = true;

if (!string_is_empty(argv[1]))
if (!string_is_empty(argv[2]))
{
static char path[PATH_MAX_LENGTH] = {0};
struct rarch_main_wrap *args =
(struct rarch_main_wrap*)params_data;

if (args)
{
strlcpy(path, argv[1], sizeof(path));
strlcpy(path, argv[2], sizeof(path));

args->touched = true;
args->no_content = false;
Expand All @@ -186,7 +179,7 @@ static void frontend_orbis_get_environment_settings(int *argc, char *argv[],
RARCH_LOG("argv[1]: %s\n", argv[1]);
RARCH_LOG("argv[2]: %s\n", argv[2]);

RARCH_LOG("Auto-start game %s.\n", argv[1]);
RARCH_LOG("Auto-start game %s.\n", argv[2]);
}
}
#endif
Expand Down
2 changes: 0 additions & 2 deletions frontend/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ int rarch_main(int argc, char *argv[], void *data)
}

#ifndef HAVE_MAIN
#ifndef ORBIS
#ifdef __cplusplus
extern "C"
#endif
Expand All @@ -170,4 +169,3 @@ int main(int argc, char *argv[])
return rarch_main(argc, argv, NULL);
}
#endif
#endif

0 comments on commit 63044b2

Please sign in to comment.