Remove RARCH_CTL_SET_LIBRETRO_PATH

This commit is contained in:
twinaphex 2019-04-21 06:03:02 +02:00
parent e5800cf733
commit 7372bafb44
10 changed files with 17 additions and 31 deletions

View File

@ -2192,7 +2192,7 @@ void config_set_defaults(void)
g_defaults.path.buildbot_server_url,
sizeof(settings->paths.network_buildbot_url));
if (!string_is_empty(g_defaults.path.core))
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, g_defaults.path.core);
path_set(RARCH_PATH_CORE, g_defaults.path.core);
if (!string_is_empty(g_defaults.dirs[DEFAULT_DIR_DATABASE]))
strlcpy(settings->paths.path_content_database,
g_defaults.dirs[DEFAULT_DIR_DATABASE],

View File

@ -411,7 +411,7 @@ static void frontend_gx_process_args(int *argc, char *argv[])
char path[PATH_MAX_LENGTH] = {0};
strlcpy(path, strrchr(argv[0], '/') + 1, sizeof(path));
if (filestream_exists(path))
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, path);
path_set(RARCH_PATH_CORE, path);
}
#endif
}

View File

@ -602,7 +602,7 @@ static void frontend_ps3_process_args(int *argc, char *argv[])
char path[PATH_MAX_LENGTH] = {0};
strlcpy(path, argv[0], sizeof(path));
if (filestream_exists(path))
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, path);
path_set(RARCH_PATH_CORE, path);
}
#endif
}

View File

@ -344,7 +344,7 @@ INT_PTR_COMPAT CALLBACK PickCoreProc(HWND hDlg, UINT message,
core_info_list_get_supported_cores(core_info_list,
path_get(RARCH_PATH_CONTENT), &core_info, &list_size);
info = (const core_info_t*)&core_info[lbItem];
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH,info->path);
path_set(RARCH_PATH_CORE, info->path);
}
break;
}

View File

@ -1528,8 +1528,7 @@ static void retroarch_parse_input_and_config(int argc, char *argv[])
}
else if (filestream_exists(optarg))
{
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, optarg);
path_set(RARCH_PATH_CORE, optarg);
retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_LIBRETRO, NULL);
/* We requested explicit core, so use PLAIN core type. */
@ -2571,8 +2570,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
runloop_pending_windowed_scale = *idx;
}
break;
case RARCH_CTL_SET_LIBRETRO_PATH:
return path_set(RARCH_PATH_CORE, (const char*)data);
case RARCH_CTL_FRAME_TIME_FREE:
memset(&runloop_frame_time, 0,
sizeof(struct retro_frame_time_callback));

View File

@ -140,8 +140,6 @@ enum rarch_ctl_state
RARCH_CTL_SET_NONBLOCK_FORCED,
RARCH_CTL_UNSET_NONBLOCK_FORCED,
RARCH_CTL_SET_LIBRETRO_PATH,
RARCH_CTL_IS_PAUSED,
RARCH_CTL_SET_PAUSED,

View File

@ -1349,8 +1349,7 @@ bool task_push_load_content_from_playlist_from_menu(
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
/* Set libretro core path */
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)core_path);
path_set(RARCH_PATH_CORE, core_path);
/* Is content required by this core? */
if (fullpath)
@ -1502,8 +1501,7 @@ bool task_push_load_new_core(
retro_task_callback_t cb,
void *user_data)
{
/* Set libretro core path */
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)core_path);
path_set(RARCH_PATH_CORE, core_path);
/* Load core */
command_event(CMD_EVENT_LOAD_CORE, NULL);
@ -1573,11 +1571,8 @@ bool task_push_load_content_with_new_core_from_menu(
if (!string_is_empty(settings->paths.directory_system))
content_ctx.directory_system = strdup(settings->paths.directory_system);
/* Set content path */
path_set(RARCH_PATH_CONTENT, fullpath);
/* Set libretro core path */
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)core_path);
path_set(RARCH_PATH_CORE, core_path);
#ifdef HAVE_DYNAMIC
/* Load core */
@ -1756,11 +1751,8 @@ bool task_push_load_content_with_new_core_from_companion_ui(
{
global_t *global = global_get_ptr();
/* Set content path */
path_set(RARCH_PATH_CONTENT, fullpath);
/* Set libretro core path */
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)core_path);
path_set(RARCH_PATH_CORE, core_path);
#ifdef HAVE_DYNAMIC
command_event(CMD_EVENT_LOAD_CORE, NULL);
#endif
@ -1837,7 +1829,6 @@ bool task_push_load_content_with_current_core_from_companion_ui(
retro_task_callback_t cb,
void *user_data)
{
/* Set content path */
path_set(RARCH_PATH_CONTENT, fullpath);
/* Load content */
@ -1860,7 +1851,6 @@ bool task_push_load_content_with_core_from_menu(
retro_task_callback_t cb,
void *user_data)
{
/* Set content path */
path_set(RARCH_PATH_CONTENT, fullpath);
/* Load content */

View File

@ -24,16 +24,18 @@
extern "C" {
#endif
#include <string/stdstring.h>
#include <file/file_path.h>
#include <retro_miscellaneous.h>
#include "../../../core_info.h"
#include "../../../verbosity.h"
#include "../../../configuration.h"
#include "../../../msg_hash.h"
#include "../../../paths.h"
#include "../../../retroarch.h"
#include "../../../command.h"
#include "../../../frontend/frontend_driver.h"
#include <string/stdstring.h>
#include <file/file_path.h>
#include <retro_miscellaneous.h>
#ifndef CXX_BUILD
}
@ -127,8 +129,7 @@ void LoadCoreWindow::loadCore(const char *path)
qApp->processEvents();
#ifdef HAVE_DYNAMIC
/* const-removing cast is safe here because the path is never written to */
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, const_cast<char*>(path));
path_set(RARCH_PATH_CORE, path);
command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL);
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);

View File

@ -548,7 +548,7 @@ static void open_core_handler(ui_browser_window_state_t *state, bool result)
settings_t *settings = config_get_ptr();
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, (void*)state->result);
path_set(RARCH_PATH_CORE, state->result);
ui_companion_event_command(CMD_EVENT_LOAD_CORE);
if (info && info->load_no_content

View File

@ -189,7 +189,7 @@ LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
switch (mode)
{
case ID_M_LOAD_CORE:
rarch_ctl(RARCH_CTL_SET_LIBRETRO_PATH, win32_file);
path_set(RARCH_PATH_CORE, win32_file);
cmd = CMD_EVENT_LOAD_CORE;
break;
case ID_M_LOAD_CONTENT: