diff --git a/command_event.c b/command_event.c index a96b7664d2..a5f04797a0 100644 --- a/command_event.c +++ b/command_event.c @@ -42,7 +42,6 @@ #include "cheevos.h" #endif -#include "libretro_private.h" #include "libretro_version_1.h" #include "verbosity.h" #include "runloop.h" @@ -907,6 +906,31 @@ static bool event_update_system_info(struct retro_system_info *_info, } #endif +bool event_cmd_exec(void *data) +{ + char *fullpath = NULL; + + RARCH_LOG("Environ (Private) EXEC.\n"); + + runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); + + if (fullpath != data) + { + runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL); + if (data) + runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, data); + } + +#if defined(HAVE_DYNAMIC) + rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL); +#else + if (frontend_driver_has_fork()) + frontend_driver_set_fork(true, true, false); +#endif + + return true; +} + /** * event_cmd_ctl: * @cmd : Event command index. @@ -974,7 +998,7 @@ bool event_cmd_ctl(enum event_command cmd, void *data) char *fullpath = NULL; runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); runloop_ctl(RUNLOOP_CTL_SET_LIBRETRO_PATH, settings->libretro); - rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)fullpath); + event_cmd_exec((void*)fullpath); event_cmd_ctl(EVENT_CMD_QUIT, NULL); #endif } diff --git a/command_event.h b/command_event.h index 3e67f3d047..ddae7c7390 100644 --- a/command_event.h +++ b/command_event.h @@ -211,6 +211,8 @@ enum event_command EVENT_CMD_VOLUME_DOWN }; +bool event_cmd_exec(void *data); + /** * event_command: * @cmd : Command index. diff --git a/dynamic.c b/dynamic.c index 2167198a48..2d4a694571 100644 --- a/dynamic.c +++ b/dynamic.c @@ -38,7 +38,6 @@ #include "performance.h" #include "system.h" -#include "libretro_private.h" #include "cores/internal_cores.h" #include "frontend/frontend_driver.h" #include "retroarch.h" @@ -1214,31 +1213,9 @@ bool rarch_environment_cb(unsigned cmd, void *data) (struct retro_framebuffer*)data); /* Private extensions for internal use, not part of libretro API. */ - case RETRO_ENVIRONMENT_EXEC: - { - char *fullpath = NULL; - - RARCH_LOG("Environ (Private) EXEC.\n"); - - runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath); - - if (fullpath != data) - { - runloop_ctl(RUNLOOP_CTL_CLEAR_CONTENT_PATH, NULL); - if (data) - runloop_ctl(RUNLOOP_CTL_SET_CONTENT_PATH, data); - } - -#if defined(HAVE_DYNAMIC) - rarch_ctl(RARCH_CTL_LOAD_CONTENT, NULL); -#else - if (frontend_driver_has_fork()) - frontend_driver_set_fork(true, true, false); -#endif - - } - break; - + /* None yet. */ + + /* Default */ default: RARCH_LOG("Environ UNSUPPORTED (#%u).\n", cmd); return false; diff --git a/frontend/drivers/platform_gx.c b/frontend/drivers/platform_gx.c index cfeddb460e..e2b541a816 100644 --- a/frontend/drivers/platform_gx.c +++ b/frontend/drivers/platform_gx.c @@ -37,7 +37,6 @@ #include "../frontend_driver.h" #include "../../defaults.h" -#include "../../libretro_private.h" #include "../../defines/gx_defines.h" #ifdef HW_RVL diff --git a/frontend/drivers/platform_qnx.c b/frontend/drivers/platform_qnx.c index 114f15f55b..d8bee45cac 100644 --- a/frontend/drivers/platform_qnx.c +++ b/frontend/drivers/platform_qnx.c @@ -23,7 +23,6 @@ #include #include "../../dynamic.h" -#include "../../libretro_private.h" static void frontend_qnx_init(void *data) { diff --git a/frontend/drivers/platform_xenon.c b/frontend/drivers/platform_xenon.c index 167ee582d7..d215d54414 100644 --- a/frontend/drivers/platform_xenon.c +++ b/frontend/drivers/platform_xenon.c @@ -33,7 +33,6 @@ #include #include "../../dynamic.h" -#include "../../libretro_private.h" static void frontend_xenon_init(void *data) { diff --git a/libretro_private.h b/libretro_private.h deleted file mode 100644 index 853e6324ab..0000000000 --- a/libretro_private.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Copyright (C) 2010-2016 The RetroArch team - * - * --------------------------------------------------------------------------------------- - * The following license statement only applies to this libretro API header (libretro_private.h). - * --------------------------------------------------------------------------------------- - * - * Permission is hereby granted, free of charge, - * to any person obtaining a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation the rights to - * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, - * and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, - * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, - * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - */ - -#ifndef LIBRETRO_PRIVATE_H__ -#define LIBRETRO_PRIVATE_H__ - -/* Private additions to libretro. No API/ABI stability guaranteed. */ - -#include "libretro.h" - -#define RETRO_ENVIRONMENT_EXEC (RETRO_ENVIRONMENT_PRIVATE | 0) - /* const char * -- - * Requests that this core is - * deinitialized, and a new core is loaded. - * The libretro core used is set with - * SET_LIBRETRO_PATH, and path to - * game is passed in _EXEC. NULL - * means no game. */ - -#endif - diff --git a/menu/menu_content.c b/menu/menu_content.c index 8b426bcf42..c923ff13a5 100644 --- a/menu/menu_content.c +++ b/menu/menu_content.c @@ -30,7 +30,6 @@ #include "../defaults.h" #include "../frontend/frontend.h" #include "../playlist.h" -#include "../libretro_private.h" #include "../retroarch.h" #include "../runloop.h" #include "../verbosity.h" @@ -196,7 +195,7 @@ void menu_content_playlist_load(void *data, unsigned idx) else menu_driver_ctl(RARCH_MENU_CTL_SET_LOAD_NO_CONTENT, NULL); - rarch_environment_cb(RETRO_ENVIRONMENT_EXEC, (void*)path); + event_cmd_exec((void*)path); event_cmd_ctl(EVENT_CMD_LOAD_CORE, NULL); } diff --git a/retroarch.c b/retroarch.c index 57dbf764f0..07d8948b71 100644 --- a/retroarch.c +++ b/retroarch.c @@ -51,7 +51,6 @@ #include "audio/audio_driver.h" #include "record/record_driver.h" #include "libretro_version_1.h" -#include "libretro_private.h" #include "configuration.h" #include "general.h" #include "runloop.h"