From d71c782459d33b6a34ef3c3f382e5f1cf17947ef Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 25 Jan 2016 03:04:42 +0100 Subject: [PATCH] Start getting rid of RETRO_ENVIRONMENT_SET_LIBRETRO_PATH --- command_event.c | 3 +-- dynamic.c | 8 -------- frontend/drivers/platform_gx.c | 3 ++- libretro_private.h | 13 ++----------- 4 files changed, 5 insertions(+), 22 deletions(-) diff --git a/command_event.c b/command_event.c index 931949394a..7bc7dadb2e 100644 --- a/command_event.c +++ b/command_event.c @@ -953,8 +953,7 @@ bool event_cmd_ctl(enum event_command cmd, void *data) #else char *fullpath = NULL; runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); - rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, - (void*)settings->libretro); + runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, settings->libretro); rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)fullpath); event_cmd_ctl(EVENT_CMD_QUIT, NULL); #endif diff --git a/dynamic.c b/dynamic.c index e2aba30466..a730aa6a5a 100644 --- a/dynamic.c +++ b/dynamic.c @@ -1215,14 +1215,6 @@ bool rarch_environment_cb(unsigned cmd, void *data) return video_driver_get_current_software_framebuffer((struct retro_framebuffer*)data); /* Private extensions for internal use, not part of libretro API. */ - case RETRO_ENVIRONMENT_SET_LIBRETRO_PATH: - RARCH_LOG("Environ (Private) SET_LIBRETRO_PATH.\n"); - - if (!path_file_exists((const char*)data)) - return false; - runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, data); - break; - case RETRO_ENVIRONMENT_EXEC: case RETRO_ENVIRONMENT_EXEC_ESCAPE: { diff --git a/frontend/drivers/platform_gx.c b/frontend/drivers/platform_gx.c index 8ddd42d79b..513e540002 100644 --- a/frontend/drivers/platform_gx.c +++ b/frontend/drivers/platform_gx.c @@ -359,7 +359,8 @@ static void frontend_gx_process_args(int *argc, char *argv[]) if (!settings->libretro[0] && *argc >= 1 && strrchr(argv[0], '/')) { strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path)); - rarch_environment_cb(RETRO_ENVIRONMENT_SET_LIBRETRO_PATH, path); + if (path_file_exists(path)) + runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, path); } #endif } diff --git a/libretro_private.h b/libretro_private.h index 8c7e792808..7c0c08583b 100644 --- a/libretro_private.h +++ b/libretro_private.h @@ -27,16 +27,7 @@ #include "libretro.h" -#define RETRO_ENVIRONMENT_SET_LIBRETRO_PATH (RETRO_ENVIRONMENT_PRIVATE | 0) - /* const char * -- - * Sets the absolute path for the - * libretro core pointed to. - * RETRO_ENVIRONMENT_EXEC will use - * the last libretro core set with this call. - * Returns false if file for absolute path - * could not be found. - */ -#define RETRO_ENVIRONMENT_EXEC (RETRO_ENVIRONMENT_PRIVATE | 1) +#define RETRO_ENVIRONMENT_EXEC (RETRO_ENVIRONMENT_PRIVATE | 0) /* const char * -- * Requests that this core is * deinitialized, and a new core is loaded. @@ -44,7 +35,7 @@ * SET_LIBRETRO_PATH, and path to * game is passed in _EXEC. NULL * means no game. */ -#define RETRO_ENVIRONMENT_EXEC_ESCAPE (RETRO_ENVIRONMENT_PRIVATE | 2) +#define RETRO_ENVIRONMENT_EXEC_ESCAPE (RETRO_ENVIRONMENT_PRIVATE | 1) /* const char * -- * Requests that this core is * deinitialized, and a new core