mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 15:40:44 +00:00
(frontend) Additional param to argc/argv for iOS/OSX ports
This commit is contained in:
parent
3fda41bb8a
commit
b805efa59a
@ -125,12 +125,18 @@ void rarch_get_environment_console(void)
|
||||
|
||||
#if defined(IOS) || defined(OSX)
|
||||
void* rarch_main(void* args)
|
||||
{
|
||||
int argc = 0;
|
||||
char *argv = NULL;
|
||||
#elif defined(HAVE_BB10)
|
||||
int rarch_main(int argc, char *argv[])
|
||||
{
|
||||
void* args = NULL;
|
||||
#else
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
{
|
||||
void* args = NULL;
|
||||
#endif
|
||||
frontend_ctx = (frontend_ctx_driver_t*)frontend_ctx_init_first();
|
||||
|
||||
if (frontend_ctx && frontend_ctx->init)
|
||||
@ -141,7 +147,7 @@ int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
if (frontend_ctx && frontend_ctx->environment_get)
|
||||
frontend_ctx->environment_get(argc, argv);
|
||||
frontend_ctx->environment_get(argc, argv, args);
|
||||
|
||||
#if !defined(RARCH_CONSOLE) && !defined(HAVE_BB10)
|
||||
#if defined(__APPLE__)
|
||||
@ -167,7 +173,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
#ifndef __APPLE__
|
||||
if (frontend_ctx && frontend_ctx->process_args)
|
||||
frontend_ctx->process_args(argc, argv);
|
||||
frontend_ctx->process_args(argc, argv, args);
|
||||
#endif
|
||||
|
||||
#if defined(RARCH_CONSOLE) || defined(HAVE_BB10)
|
||||
|
@ -32,13 +32,13 @@
|
||||
|
||||
typedef struct frontend_ctx_driver
|
||||
{
|
||||
void (*environment_get)(int argc, char *argv[]);
|
||||
void (*environment_get)(int argc, char *argv[], void *args);
|
||||
|
||||
void (*init)(void);
|
||||
void (*deinit)(void);
|
||||
void (*exitspawn)(void);
|
||||
|
||||
int (*process_args)(int argc, char *argv[]);
|
||||
int (*process_args)(int argc, char *argv[], void *args);
|
||||
int (*process_events)(void);
|
||||
void (*exec)(const char *, bool);
|
||||
void (*shutdown)(bool);
|
||||
|
@ -98,11 +98,12 @@ static int system_ctx_init(void)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
void *args = NULL;
|
||||
if (system_ctx_init() != 0)
|
||||
return 0;
|
||||
|
||||
frontend_ctx->init();
|
||||
get_environment_settings(argc, argv);
|
||||
get_environment_settings(argc, argv, args);
|
||||
salamander_init_settings();
|
||||
frontend_ctx->deinit();
|
||||
frontend_ctx->exitspawn();
|
||||
|
@ -83,10 +83,11 @@ static void system_shutdown(bool force)
|
||||
dispatch_async_f(dispatch_get_main_queue(), 0, apple_rarch_exited);
|
||||
}
|
||||
|
||||
static void environment_get(int argc, char *argv[])
|
||||
static void environment_get(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
(void)args;
|
||||
|
||||
#ifdef IOS
|
||||
char* system_directory = ios_get_rarch_system_directory();
|
||||
|
@ -229,7 +229,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[])
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
g_extern.verbose = true;
|
||||
@ -359,7 +359,7 @@ static void system_deinit(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[])
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -357,7 +357,7 @@ static void system_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[])
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
#ifndef IS_SALAMANDER
|
||||
if (argc > 1)
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
static void get_environment_settings(int argc, char *argv[])
|
||||
static void get_environment_settings(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
@ -282,7 +282,7 @@ static void system_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
static int system_process_args(int argc, char *argv[])
|
||||
static int system_process_args(int argc, char *argv[], void *args)
|
||||
{
|
||||
(void)argc;
|
||||
(void)argv;
|
||||
|
Loading…
x
Reference in New Issue
Block a user