mirror of
https://github.com/libretro/RetroArch
synced 2024-12-28 09:29:16 +00:00
Create event_cmd_exec - get rid of libretro_private.h
This commit is contained in:
parent
aeb5a8e32f
commit
f70a082626
@ -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
|
||||
}
|
||||
|
@ -211,6 +211,8 @@ enum event_command
|
||||
EVENT_CMD_VOLUME_DOWN
|
||||
};
|
||||
|
||||
bool event_cmd_exec(void *data);
|
||||
|
||||
/**
|
||||
* event_command:
|
||||
* @cmd : Command index.
|
||||
|
29
dynamic.c
29
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;
|
||||
|
@ -37,7 +37,6 @@
|
||||
|
||||
#include "../frontend_driver.h"
|
||||
#include "../../defaults.h"
|
||||
#include "../../libretro_private.h"
|
||||
#include "../../defines/gx_defines.h"
|
||||
|
||||
#ifdef HW_RVL
|
||||
|
@ -23,7 +23,6 @@
|
||||
#include <bps/bps.h>
|
||||
|
||||
#include "../../dynamic.h"
|
||||
#include "../../libretro_private.h"
|
||||
|
||||
static void frontend_qnx_init(void *data)
|
||||
{
|
||||
|
@ -33,7 +33,6 @@
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../../dynamic.h"
|
||||
#include "../../libretro_private.h"
|
||||
|
||||
static void frontend_xenon_init(void *data)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user