mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-05 08:57:38 +00:00
Create consistent naming conventions - use retroarch_ instead
of rarch_ for some functions for all functions coming from retroarch.h
This commit is contained in:
parent
e4bec6739c
commit
e886e908d5
@ -1020,7 +1020,7 @@ void rcheevos_validate_config_settings(void)
|
||||
if (!(disallowed_settings = rc_libretro_get_disallowed_settings(system->library_name)))
|
||||
return;
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (!retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
return;
|
||||
|
||||
for (i = 0; i < (int)coreopts->size; i++)
|
||||
|
@ -901,7 +901,7 @@ bool command_event_resize_windowed_scale(settings_t *settings,
|
||||
if (!video_fullscreen)
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
retroarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -2641,9 +2641,9 @@ void config_set_defaults(void *data)
|
||||
*settings->paths.directory_video_filter = '\0';
|
||||
*settings->paths.directory_audio_filter = '\0';
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_UPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BPS_PREF, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||
|
||||
if (global)
|
||||
{
|
||||
@ -2879,9 +2879,9 @@ void config_set_defaults(void *data)
|
||||
#ifdef HAVE_CONFIGFILE
|
||||
/* Avoid reloading config on every content load */
|
||||
if (DEFAULT_BLOCK_CONFIG_READ)
|
||||
rarch_ctl(RARCH_CTL_SET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_BLOCK_CONFIG_READ, NULL);
|
||||
else
|
||||
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
@ -3263,7 +3263,7 @@ static bool config_load_file(global_t *global,
|
||||
|
||||
/* Overrides */
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL))
|
||||
override_username = strdup(settings->paths.username);
|
||||
|
||||
/* Boolean settings */
|
||||
@ -3426,7 +3426,7 @@ static bool config_load_file(global_t *global,
|
||||
|
||||
/* Post-settings load */
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL) && override_username)
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_SET_USERNAME, NULL) && override_username)
|
||||
{
|
||||
configuration_set_string(settings,
|
||||
settings->paths.username,
|
||||
@ -4023,7 +4023,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Game-specific remap found at \"%s\".\n", game_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
/* msg_remap_loaded is set to MSG_GAME_REMAP_FILE_LOADED
|
||||
* by default - no need to change it here */
|
||||
goto success;
|
||||
@ -4039,7 +4039,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Content-dir-specific remap found at \"%s\".\n", content_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
msg_remap_loaded = MSG_DIRECTORY_REMAP_FILE_LOADED;
|
||||
goto success;
|
||||
}
|
||||
@ -4054,7 +4054,7 @@ bool config_load_remap(const char *directory_input_remapping,
|
||||
RARCH_LOG("[Remaps]: Core-specific remap found at \"%s\".\n", core_path);
|
||||
if (ret)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
msg_remap_loaded = MSG_CORE_REMAP_FILE_LOADED;
|
||||
goto success;
|
||||
}
|
||||
@ -4513,7 +4513,7 @@ bool config_save_file(const char *path)
|
||||
if (!conf)
|
||||
conf = config_file_new_alloc();
|
||||
|
||||
if (!conf || rarch_ctl(RARCH_CTL_IS_OVERRIDES_ACTIVE, NULL))
|
||||
if (!conf || retroarch_ctl(RARCH_CTL_IS_OVERRIDES_ACTIVE, NULL))
|
||||
{
|
||||
if (conf)
|
||||
config_file_free(conf);
|
||||
@ -4660,7 +4660,7 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "log_verbosity",
|
||||
verbosity_is_enabled());
|
||||
config_set_bool(conf, "perfcnt_enable",
|
||||
rarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL));
|
||||
retroarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL));
|
||||
|
||||
msg_color = (((int)(settings->floats.video_msg_color_r * 255.0f) & 0xff) << 16) +
|
||||
(((int)(settings->floats.video_msg_color_g * 255.0f) & 0xff) << 8) +
|
||||
@ -4986,7 +4986,7 @@ bool config_replace(bool config_replace_save_on_exit, char *path)
|
||||
|
||||
path_set(RARCH_PATH_CONFIG, path);
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_BLOCK_CONFIG_READ, NULL);
|
||||
|
||||
/* Load core in new (salamander) config. */
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
|
@ -1678,7 +1678,7 @@ void core_option_manager_set_val(core_option_manager_t *opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
@ -1730,7 +1730,7 @@ void core_option_manager_adjust_val(core_option_manager_t* opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
@ -1776,7 +1776,7 @@ void core_option_manager_set_default(core_option_manager_t *opt,
|
||||
/* Refresh menu (if required) if core option
|
||||
* visibility has changed as a result of modifying
|
||||
* the current option value */
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTION_UPDATE_DISPLAY, NULL) &&
|
||||
refresh_menu)
|
||||
{
|
||||
bool refresh = false;
|
||||
|
@ -101,7 +101,7 @@ static void callback_sysutil_exit(uint64_t status,
|
||||
if (frontend)
|
||||
frontend->shutdown = frontend_ps3_shutdown;
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -852,7 +852,7 @@ static LRESULT win32_menu_loop(HWND owner, WPARAM wparam)
|
||||
if (mode >= ID_M_WINDOW_SCALE_1X && mode <= ID_M_WINDOW_SCALE_10X)
|
||||
{
|
||||
unsigned idx = (mode - (ID_M_WINDOW_SCALE_1X-1));
|
||||
rarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
retroarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
command_event(CMD_EVENT_RESIZE_WINDOWED_SCALE, NULL);
|
||||
}
|
||||
else if (mode == ID_M_STATE_INDEX_AUTO)
|
||||
|
@ -459,7 +459,7 @@ static void bottom_menu_control(void* data, bool lcd_bottom)
|
||||
|
||||
BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if (!ctr->bottom_is_idle)
|
||||
{
|
||||
@ -592,7 +592,7 @@ static void bottom_menu_control(void* data, bool lcd_bottom)
|
||||
}
|
||||
|
||||
if (ctr->bottom_menu == CTR_BOTTOM_MENU_NOT_AVAILABLE ||
|
||||
!rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
!retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
return;
|
||||
|
||||
|
||||
@ -1218,7 +1218,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
lcd_bottom = settings->bools.video_3ds_lcd_bottom;
|
||||
if (lcd_bottom != ctr_bottom_screen_enabled)
|
||||
{
|
||||
if (rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
ctr_set_bottom_screen_enable(lcd_bottom, false);
|
||||
if (lcd_bottom)
|
||||
@ -1570,7 +1570,7 @@ static bool ctr_frame(void* data, const void* frame,
|
||||
|
||||
#ifndef CONSOLE_LOG
|
||||
if (ctr_bottom_screen_enabled &&
|
||||
rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if ( !ctr->bottom_is_idle )
|
||||
{
|
||||
|
@ -490,7 +490,7 @@ static bool video_thread_alive(void *data)
|
||||
bool ret;
|
||||
thread_video_t *thr = (thread_video_t*)data;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
{
|
||||
thread_packet_t pkt;
|
||||
|
||||
|
@ -380,8 +380,8 @@ static void android_input_poll_main_cmd(void)
|
||||
(UINT64_C(1) << RETRO_SENSOR_GYROSCOPE_ENABLE)) &&
|
||||
!android_app->gyroscopeSensor;
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
rarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
video_driver_unset_stub_frame();
|
||||
|
||||
if (enable_accelerometer)
|
||||
@ -409,8 +409,8 @@ static void android_input_poll_main_cmd(void)
|
||||
(UINT64_C(1) << RETRO_SENSOR_GYROSCOPE_ENABLE)) &&
|
||||
android_app->gyroscopeSensor;
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
rarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
video_driver_set_stub_frame();
|
||||
|
||||
/* Avoid draining battery while app is not being used. */
|
||||
@ -1324,13 +1324,13 @@ static void android_input_poll(void *data)
|
||||
|
||||
if (android_app->destroyRequested != 0)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (android_app->reinitRequested != 0)
|
||||
{
|
||||
if (rarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
||||
return;
|
||||
@ -1348,13 +1348,13 @@ bool android_run_events(void *data)
|
||||
/* Check if we are exiting. */
|
||||
if (android_app->destroyRequested != 0)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (android_app->reinitRequested != 0)
|
||||
{
|
||||
if (rarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_PAUSED, NULL))
|
||||
command_event(CMD_EVENT_REINIT, NULL);
|
||||
android_app_write_cmd(android_app, APP_CMD_REINIT_DONE);
|
||||
}
|
||||
|
@ -668,9 +668,8 @@ static void qnx_handle_navigator_event(
|
||||
|
||||
return;
|
||||
|
||||
shutdown:
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
return;
|
||||
shutdown:
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
}
|
||||
|
||||
static void *qnx_input_init(const char *joypad_driver)
|
||||
|
@ -459,7 +459,7 @@ static void gx_joypad_poll(void)
|
||||
#ifdef HW_RVL
|
||||
if (g_quit)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
g_quit = false;
|
||||
return;
|
||||
}
|
||||
|
@ -1297,7 +1297,7 @@ static void menu_action_setting_disp_set_label_core_option_override_info(
|
||||
|
||||
if (!string_is_empty(override_path))
|
||||
options_file = path_basename_nocompression(override_path);
|
||||
else if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
else if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
{
|
||||
const char *options_path = coreopts->conf_path;
|
||||
if (!string_is_empty(options_path))
|
||||
@ -1511,7 +1511,7 @@ static void menu_action_setting_disp_set_label_core_options(
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
desc = core_option_manager_get_category_desc(
|
||||
coreopts, category);
|
||||
}
|
||||
@ -1539,7 +1539,7 @@ static void menu_action_setting_disp_set_label_core_option(
|
||||
*s = '\0';
|
||||
*w = 19;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
{
|
||||
coreopt_label = core_option_manager_get_val_label(coreopts,
|
||||
type - MENU_SETTINGS_CORE_OPTION_START);
|
||||
|
@ -795,7 +795,7 @@ static int core_setting_left(unsigned type, const char *label,
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTION_PREV, &idx);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTION_PREV, &idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -3401,13 +3401,13 @@ static int generic_action_ok_remap_file_operation(const char *path,
|
||||
switch (action_type)
|
||||
{
|
||||
case ACTION_OK_REMAP_FILE_SAVE_CORE:
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CORE_ACTIVE, NULL);
|
||||
break;
|
||||
case ACTION_OK_REMAP_FILE_SAVE_GAME:
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
break;
|
||||
case ACTION_OK_REMAP_FILE_SAVE_CONTENT_DIR:
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
@ -3430,21 +3430,21 @@ static int generic_action_ok_remap_file_operation(const char *path,
|
||||
switch (action_type)
|
||||
{
|
||||
case ACTION_OK_REMAP_FILE_REMOVE_CORE:
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_CORE_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_CORE_ACTIVE, NULL))
|
||||
{
|
||||
input_remapping_deinit();
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_REMAP_FILE_REMOVE_GAME:
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
{
|
||||
input_remapping_deinit();
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
break;
|
||||
case ACTION_OK_REMAP_FILE_REMOVE_CONTENT_DIR:
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE, NULL))
|
||||
{
|
||||
input_remapping_deinit();
|
||||
input_remapping_set_defaults(false);
|
||||
@ -3800,7 +3800,7 @@ int action_ok_core_option_dropdown_list(const char *path,
|
||||
goto push_dropdown_list;
|
||||
|
||||
/* > Get core options struct */
|
||||
if (!rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts) ||
|
||||
if (!retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts) ||
|
||||
(option_index >= coreopts->size))
|
||||
goto push_dropdown_list;
|
||||
|
||||
@ -6057,7 +6057,7 @@ static int action_ok_push_dropdown_setting_core_options_item_special(
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
int core_option_idx = (int)atoi(label);
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (!coreopts)
|
||||
return -1;
|
||||
@ -6073,7 +6073,7 @@ static int action_ok_push_dropdown_setting_core_options_item(const char *path,
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
int core_option_idx = (int)atoi(label);
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (!coreopts)
|
||||
return -1;
|
||||
@ -7289,7 +7289,7 @@ static int action_ok_core_delete(const char *path,
|
||||
|
||||
/* Check if core to be deleted is currently
|
||||
* loaded - if so, unload it */
|
||||
if (rarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
generic_action_ok_command(CMD_EVENT_UNLOAD_CORE);
|
||||
|
||||
/* Delete core file */
|
||||
|
@ -914,7 +914,7 @@ int core_setting_right(unsigned type, const char *label,
|
||||
{
|
||||
unsigned idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTION_NEXT, &idx);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTION_NEXT, &idx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -366,7 +366,7 @@ static int action_start_core_setting(
|
||||
unsigned core_idx = type - MENU_SETTINGS_CORE_OPTION_START;
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
core_option_manager_set_default(coreopts, core_idx, true);
|
||||
|
||||
return 0;
|
||||
|
@ -1536,7 +1536,7 @@ static int action_bind_sublabel_core_options(
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
info = core_option_manager_get_category_info(
|
||||
coreopts, category);
|
||||
}
|
||||
@ -1565,7 +1565,7 @@ static int action_bind_sublabel_core_option(
|
||||
core_option_manager_t *opt = NULL;
|
||||
const char *info = NULL;
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &opt))
|
||||
if (!retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &opt))
|
||||
return 0;
|
||||
|
||||
info = core_option_manager_get_info(opt,
|
||||
|
@ -213,7 +213,7 @@ static int action_get_title_core_options_list(
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
title = core_option_manager_get_category_desc(
|
||||
coreopts, category);
|
||||
}
|
||||
@ -254,7 +254,7 @@ static int action_get_title_dropdown_item(
|
||||
|
||||
if (tmp_str_list.size > 0)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (coreopts)
|
||||
{
|
||||
|
@ -8263,7 +8263,7 @@ static void materialui_populate_nav_bar(
|
||||
* > Menu driver must be alive at this point, and retroarch
|
||||
* must be initialised, so all we have to do (or can do)
|
||||
* is check whether a non-dummy core is loaded) */
|
||||
mui->nav_bar.resume_tab.enabled = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL);
|
||||
mui->nav_bar.resume_tab.enabled = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL);
|
||||
|
||||
/* Menu tabs */
|
||||
|
||||
@ -9217,9 +9217,9 @@ static int materialui_list_push(void *data, void *userdata,
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -7642,9 +7642,9 @@ static int ozone_list_push(void *data, void *userdata,
|
||||
rarch_system_info_t *system = &runloop_state_get_ptr()->system;
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -6951,9 +6951,9 @@ static int xmb_list_push(void *data, void *userdata,
|
||||
rarch_system_info_t *system = &runloop_state_get_ptr()->system;
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
{
|
||||
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
|
||||
info->list,
|
||||
|
@ -616,12 +616,12 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info,
|
||||
firmware_info.path = core_info->path;
|
||||
firmware_info.directory.system = settings->paths.directory_system;
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
|
||||
update_missing_firmware = core_info_list_update_missing_firmware(&firmware_info, &set_missing_firmware);
|
||||
|
||||
if (set_missing_firmware)
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
|
||||
if (update_missing_firmware)
|
||||
{
|
||||
@ -951,7 +951,7 @@ static unsigned menu_displaylist_parse_core_option_dropdown_list(
|
||||
unsigned j;
|
||||
|
||||
/* Fetch options */
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (!coreopts)
|
||||
goto end;
|
||||
@ -1031,10 +1031,10 @@ static unsigned menu_displaylist_parse_core_option_override_list(
|
||||
menu_displaylist_info_t *info, settings_t *settings)
|
||||
{
|
||||
unsigned count = 0;
|
||||
bool core_has_options = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) &&
|
||||
rarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL);
|
||||
bool game_options_active = rarch_ctl(RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, NULL);
|
||||
bool folder_options_active = rarch_ctl(RARCH_CTL_IS_FOLDER_OPTIONS_ACTIVE, NULL);
|
||||
bool core_has_options = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL) &&
|
||||
retroarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL);
|
||||
bool game_options_active = retroarch_ctl(RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, NULL);
|
||||
bool folder_options_active = retroarch_ctl(RARCH_CTL_IS_FOLDER_OPTIONS_ACTIVE, NULL);
|
||||
bool show_core_options_flush = settings ?
|
||||
settings->bools.quick_menu_show_core_options_flush : false;
|
||||
|
||||
@ -2858,7 +2858,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
{
|
||||
unsigned count = 0;
|
||||
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
{
|
||||
#ifdef HAVE_LAKKA
|
||||
bool show_advanced_settings = settings->bools.menu_show_advanced_settings;
|
||||
@ -3123,7 +3123,7 @@ static int menu_displaylist_parse_load_content_settings(
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if ((!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
&& disk_control_enabled(&system->disk_control))
|
||||
if (menu_entries_append_enum(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISK_OPTIONS),
|
||||
@ -3199,7 +3199,7 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||
if (playlist)
|
||||
playlist_get_index(playlist, idx, &entry);
|
||||
|
||||
content_loaded = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||
content_loaded = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||
&& string_is_equal(menu->deferred_path, fullpath);
|
||||
|
||||
if (content_loaded)
|
||||
@ -3467,7 +3467,7 @@ static unsigned menu_displaylist_parse_information_list(file_list_t *info_list)
|
||||
count++;
|
||||
#endif
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_PERFCNT_ENABLE, NULL))
|
||||
{
|
||||
if (menu_entries_append_enum(info_list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FRONTEND_COUNTERS),
|
||||
@ -4134,7 +4134,7 @@ static unsigned menu_displaylist_parse_content_information(
|
||||
const char *db_name = NULL;
|
||||
bool playlist_valid = false;
|
||||
unsigned count = 0;
|
||||
bool content_loaded = !rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||
bool content_loaded = !retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL)
|
||||
&& string_is_equal(menu->deferred_path, loaded_content_path);
|
||||
|
||||
core_name[0] = '\0';
|
||||
@ -6215,7 +6215,7 @@ unsigned menu_displaylist_build_list(
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_CORE_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_CORE_ACTIVE, NULL))
|
||||
if (menu_entries_append_enum(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CORE),
|
||||
@ -6223,7 +6223,7 @@ unsigned menu_displaylist_build_list(
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_GAME_ACTIVE, NULL))
|
||||
if (menu_entries_append_enum(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_GAME),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_REMOVE_GAME),
|
||||
@ -6231,7 +6231,7 @@ unsigned menu_displaylist_build_list(
|
||||
MENU_SETTING_ACTION, 0, 0))
|
||||
count++;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_REMAPS_CONTENT_DIR_ACTIVE, NULL))
|
||||
if (menu_entries_append_enum(list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CONTENT_DIR),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_REMAP_FILE_REMOVE_CONTENT_DIR),
|
||||
@ -9516,7 +9516,7 @@ static bool history_needs_navigation_clear(
|
||||
|
||||
/* If content is running, compare last selected path
|
||||
* with current content path */
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
return string_is_equal(menu->deferred_path, path_get(RARCH_PATH_CONTENT));
|
||||
|
||||
/* If content is not running, have to examine the
|
||||
@ -11487,7 +11487,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL))
|
||||
{
|
||||
bool game_specific_options = settings->bools.game_specific_options;
|
||||
const char *category = info->path;
|
||||
@ -11502,7 +11502,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
MENU_SETTING_ACTION_CORE_OPTION_OVERRIDE_LIST, 0, 0))
|
||||
count++;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts))
|
||||
{
|
||||
nested_list_item_t *category_item = NULL;
|
||||
nested_list_t *option_list = NULL;
|
||||
@ -12231,9 +12231,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
const char *menu_ident = menu_driver_ident();
|
||||
#endif
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_CORE_IS_RUNNING, NULL))
|
||||
{
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
|
||||
MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
||||
PARSE_ACTION, false) == 0)
|
||||
|
@ -2243,7 +2243,7 @@ static bool menu_driver_displaylist_push_internal(
|
||||
|
||||
#if 0
|
||||
#ifdef HAVE_SCREENSHOTS
|
||||
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_TAKE_SCREENSHOT),
|
||||
|
@ -8217,8 +8217,8 @@ static void general_write_handler(rarch_setting_t *setting)
|
||||
if (run_ahead_enabled &&
|
||||
(run_ahead_frames > 0) &&
|
||||
run_ahead_secondary_instance &&
|
||||
!rarch_ctl(RARCH_CTL_IS_SECOND_CORE_LOADED, NULL) &&
|
||||
rarch_ctl(RARCH_CTL_IS_SECOND_CORE_AVAILABLE, NULL) &&
|
||||
!retroarch_ctl(RARCH_CTL_IS_SECOND_CORE_LOADED, NULL) &&
|
||||
retroarch_ctl(RARCH_CTL_IS_SECOND_CORE_AVAILABLE, NULL) &&
|
||||
command_event(CMD_EVENT_LOAD_SECOND_CORE, NULL))
|
||||
command_event(CMD_EVENT_CHEATS_APPLY, NULL);
|
||||
}
|
||||
@ -10130,7 +10130,7 @@ static bool setting_append_list(
|
||||
START_SUB_GROUP(list, list_info, "Performance Counters", &group_info, &subgroup_info,
|
||||
parent_group);
|
||||
|
||||
rarch_ctl(RARCH_CTL_GET_PERFCNT, &tmp_b);
|
||||
retroarch_ctl(RARCH_CTL_GET_PERFCNT, &tmp_b);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
651
retroarch.c
651
retroarch.c
@ -6715,7 +6715,7 @@ static bool command_event_init_core(
|
||||
/* reset video format to libretro's default */
|
||||
p_rarch->video_driver_pix_fmt = RETRO_PIXEL_FORMAT_0RGB1555;
|
||||
|
||||
p_rarch->current_core.retro_set_environment(rarch_environment_cb);
|
||||
p_rarch->current_core.retro_set_environment(retroarch_environment_cb);
|
||||
|
||||
/* Load any input remap files
|
||||
* > Note that we always cache the current global
|
||||
@ -9471,7 +9471,7 @@ void main_exit(void *args)
|
||||
if (menu_st)
|
||||
menu_st->data_own = false;
|
||||
#endif
|
||||
rarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL);
|
||||
retroarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL);
|
||||
|
||||
if (runloop_state.perfcnt_enable)
|
||||
{
|
||||
@ -9501,7 +9501,7 @@ void main_exit(void *args)
|
||||
|
||||
retro_main_log_file_deinit();
|
||||
|
||||
rarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
global_free(p_rarch);
|
||||
task_queue_deinit();
|
||||
|
||||
@ -9576,7 +9576,7 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||
p_rarch->configuration_settings = (settings_t*)calloc(1, sizeof(settings_t));
|
||||
|
||||
retroarch_deinit_drivers(p_rarch, &p_rarch->retro_ctx);
|
||||
rarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
global_free(p_rarch);
|
||||
|
||||
frontend_driver_init_first(data);
|
||||
@ -10247,8 +10247,313 @@ static void runloop_core_msg_queue_push(
|
||||
category);
|
||||
}
|
||||
|
||||
static void retroarch_deinit_core_options(
|
||||
bool game_options_active,
|
||||
const char *path_core_options,
|
||||
core_option_manager_t *core_options)
|
||||
{
|
||||
/* Check whether game-specific options file is being used */
|
||||
if (!string_is_empty(path_core_options))
|
||||
{
|
||||
config_file_t *conf_tmp = NULL;
|
||||
|
||||
/* We only need to save configuration settings for
|
||||
* the current core
|
||||
* > If game-specific options file exists, have
|
||||
* to read it (to ensure file only gets written
|
||||
* if config values change)
|
||||
* > Otherwise, create a new, empty config_file_t
|
||||
* object */
|
||||
if (path_is_valid(path_core_options))
|
||||
conf_tmp = config_file_new_from_path_to_string(path_core_options);
|
||||
|
||||
if (!conf_tmp)
|
||||
conf_tmp = config_file_new_alloc();
|
||||
|
||||
if (conf_tmp)
|
||||
{
|
||||
core_option_manager_flush(
|
||||
core_options,
|
||||
conf_tmp);
|
||||
RARCH_LOG("[Core Options]: Saved %s-specific core options to \"%s\"\n",
|
||||
game_options_active ? "game" : "folder", path_core_options);
|
||||
config_file_write(conf_tmp, path_core_options, true);
|
||||
config_file_free(conf_tmp);
|
||||
conf_tmp = NULL;
|
||||
}
|
||||
path_clear(RARCH_PATH_CORE_OPTIONS);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *path = core_options->conf_path;
|
||||
core_option_manager_flush(
|
||||
core_options,
|
||||
core_options->conf);
|
||||
RARCH_LOG("[Core Options]: Saved core options file to \"%s\"\n", path);
|
||||
config_file_write(core_options->conf, path, true);
|
||||
}
|
||||
|
||||
if (core_options)
|
||||
core_option_manager_free(core_options);
|
||||
}
|
||||
|
||||
static bool retroarch_validate_per_core_options(char *s,
|
||||
size_t len, bool mkdir,
|
||||
const char *core_name, const char *game_name)
|
||||
{
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
config_directory[0] = '\0';
|
||||
|
||||
if (!s ||
|
||||
(len < 1) ||
|
||||
string_is_empty(core_name) ||
|
||||
string_is_empty(game_name))
|
||||
return false;
|
||||
|
||||
fill_pathname_application_special(config_directory,
|
||||
sizeof(config_directory), APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
fill_pathname_join_special_ext(s,
|
||||
config_directory, core_name, game_name,
|
||||
".opt", len);
|
||||
|
||||
/* No need to make a directory if file already exists... */
|
||||
if (mkdir && !path_is_valid(s))
|
||||
{
|
||||
char new_path[PATH_MAX_LENGTH];
|
||||
new_path[0] = '\0';
|
||||
|
||||
fill_pathname_join(new_path,
|
||||
config_directory, core_name, sizeof(new_path));
|
||||
|
||||
if (!path_is_directory(new_path))
|
||||
path_mkdir(new_path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool retroarch_validate_folder_options(
|
||||
char *s, size_t len, bool mkdir)
|
||||
{
|
||||
char folder_name[PATH_MAX_LENGTH];
|
||||
const char *core_name = runloop_state.system.info.library_name;
|
||||
const char *game_path = path_get(RARCH_PATH_BASENAME);
|
||||
|
||||
folder_name[0] = '\0';
|
||||
|
||||
if (string_is_empty(game_path))
|
||||
return false;
|
||||
|
||||
fill_pathname_parent_dir_name(folder_name,
|
||||
game_path, sizeof(folder_name));
|
||||
|
||||
return retroarch_validate_per_core_options(s, len, mkdir,
|
||||
core_name, folder_name);
|
||||
}
|
||||
|
||||
|
||||
static bool retroarch_validate_game_options(
|
||||
const char *core_name,
|
||||
char *s, size_t len, bool mkdir)
|
||||
{
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
return retroarch_validate_per_core_options(s, len, mkdir,
|
||||
core_name, game_name);
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_environment_cb:
|
||||
* retroarch_game_specific_options:
|
||||
*
|
||||
* Returns: true (1) if a game specific core
|
||||
* options path has been found,
|
||||
* otherwise false (0).
|
||||
**/
|
||||
static bool retroarch_game_specific_options(char **output)
|
||||
{
|
||||
char game_options_path[PATH_MAX_LENGTH];
|
||||
game_options_path[0] ='\0';
|
||||
|
||||
if (!retroarch_validate_game_options(
|
||||
runloop_state.system.info.library_name,
|
||||
game_options_path,
|
||||
sizeof(game_options_path), false) ||
|
||||
!path_is_valid(game_options_path))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_GAME_SPECIFIC_CORE_OPTIONS_FOUND_AT),
|
||||
game_options_path);
|
||||
*output = strdup(game_options_path);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* retroarch_folder_specific_options:
|
||||
*
|
||||
* Returns: true (1) if a folder specific core
|
||||
* options path has been found,
|
||||
* otherwise false (0).
|
||||
**/
|
||||
static bool retroarch_folder_specific_options(
|
||||
char **output)
|
||||
{
|
||||
char folder_options_path[PATH_MAX_LENGTH];
|
||||
folder_options_path[0] ='\0';
|
||||
|
||||
if (!retroarch_validate_folder_options(
|
||||
folder_options_path,
|
||||
sizeof(folder_options_path), false) ||
|
||||
!path_is_valid(folder_options_path))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_FOLDER_SPECIFIC_CORE_OPTIONS_FOUND_AT),
|
||||
folder_options_path);
|
||||
*output = strdup(folder_options_path);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* Fetches core options path for current core/content
|
||||
* - path: path from which options should be read
|
||||
* from/saved to
|
||||
* - src_path: in the event that 'path' file does not
|
||||
* yet exist, provides source path from which initial
|
||||
* options should be extracted
|
||||
*
|
||||
* NOTE: caller must ensure
|
||||
* path and src_path are NULL-terminated
|
||||
* */
|
||||
static void retroarch_init_core_options_path(
|
||||
settings_t *settings,
|
||||
char *path, size_t len,
|
||||
char *src_path, size_t src_len)
|
||||
{
|
||||
char *game_options_path = NULL;
|
||||
char *folder_options_path = NULL;
|
||||
|
||||
bool game_specific_options = settings->bools.game_specific_options;
|
||||
|
||||
/* Check whether game-specific options exist */
|
||||
if (game_specific_options &&
|
||||
retroarch_game_specific_options(&game_options_path))
|
||||
{
|
||||
/* Notify system that we have a valid core options
|
||||
* override */
|
||||
path_set(RARCH_PATH_CORE_OPTIONS, game_options_path);
|
||||
runloop_state.game_options_active = true;
|
||||
runloop_state.folder_options_active = false;
|
||||
|
||||
/* Copy options path */
|
||||
strlcpy(path, game_options_path, len);
|
||||
|
||||
free(game_options_path);
|
||||
}
|
||||
/* Check whether folder-specific options exist */
|
||||
else if (game_specific_options &&
|
||||
retroarch_folder_specific_options(
|
||||
&folder_options_path))
|
||||
{
|
||||
/* Notify system that we have a valid core options
|
||||
* override */
|
||||
path_set(RARCH_PATH_CORE_OPTIONS, folder_options_path);
|
||||
runloop_state.game_options_active = false;
|
||||
runloop_state.folder_options_active = true;
|
||||
|
||||
/* Copy options path */
|
||||
strlcpy(path, folder_options_path, len);
|
||||
|
||||
free(folder_options_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
char global_options_path[PATH_MAX_LENGTH];
|
||||
char per_core_options_path[PATH_MAX_LENGTH];
|
||||
bool per_core_options_exist = false;
|
||||
bool per_core_options = !settings->bools.global_core_options;
|
||||
const char *path_core_options = settings->paths.path_core_options;
|
||||
|
||||
global_options_path[0] = '\0';
|
||||
per_core_options_path[0] = '\0';
|
||||
|
||||
if (per_core_options)
|
||||
{
|
||||
const char *core_name = runloop_state.system.info.library_name;
|
||||
/* Get core-specific options path
|
||||
* > if retroarch_validate_per_core_options() returns
|
||||
* false, then per-core options are disabled (due to
|
||||
* unknown system errors...) */
|
||||
per_core_options = retroarch_validate_per_core_options(
|
||||
per_core_options_path, sizeof(per_core_options_path), true,
|
||||
core_name, core_name);
|
||||
|
||||
/* If we can use per-core options, check whether an options
|
||||
* file already exists */
|
||||
if (per_core_options)
|
||||
per_core_options_exist = path_is_valid(per_core_options_path);
|
||||
}
|
||||
|
||||
/* If not using per-core options, or if a per-core options
|
||||
* file does not yet exist, must fetch 'global' options path */
|
||||
if (!per_core_options || !per_core_options_exist)
|
||||
{
|
||||
const char *options_path = path_core_options;
|
||||
|
||||
if (!string_is_empty(options_path))
|
||||
strlcpy(global_options_path,
|
||||
options_path, sizeof(global_options_path));
|
||||
else if (!path_is_empty(RARCH_PATH_CONFIG))
|
||||
fill_pathname_resolve_relative(
|
||||
global_options_path, path_get(RARCH_PATH_CONFIG),
|
||||
FILE_PATH_CORE_OPTIONS_CONFIG, sizeof(global_options_path));
|
||||
}
|
||||
|
||||
/* Allocate correct path/src_path strings */
|
||||
if (per_core_options)
|
||||
{
|
||||
strlcpy(path, per_core_options_path, len);
|
||||
|
||||
if (!per_core_options_exist)
|
||||
strlcpy(src_path, global_options_path, src_len);
|
||||
}
|
||||
else
|
||||
strlcpy(path, global_options_path, len);
|
||||
|
||||
/* Notify system that we *do not* have a valid core options
|
||||
* options override */
|
||||
runloop_state.game_options_active = false;
|
||||
runloop_state.folder_options_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
static core_option_manager_t *retroarch_init_core_options(
|
||||
settings_t *settings,
|
||||
const struct retro_core_options_v2 *options_v2)
|
||||
{
|
||||
bool categories_enabled = settings->bools.core_option_category_enable;
|
||||
char options_path[PATH_MAX_LENGTH];
|
||||
char src_options_path[PATH_MAX_LENGTH];
|
||||
|
||||
/* Ensure these are NULL-terminated */
|
||||
options_path[0] = '\0';
|
||||
src_options_path[0] = '\0';
|
||||
|
||||
/* Get core options file path */
|
||||
retroarch_init_core_options_path(settings,
|
||||
options_path, sizeof(options_path),
|
||||
src_options_path, sizeof(src_options_path));
|
||||
|
||||
if (!string_is_empty(options_path))
|
||||
return core_option_manager_new(options_path,
|
||||
src_options_path, options_v2,
|
||||
categories_enabled);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* retroarch_environment_cb:
|
||||
* @cmd : Identifier of command.
|
||||
* @data : Pointer to data.
|
||||
*
|
||||
@ -10257,7 +10562,7 @@ static void runloop_core_msg_queue_push(
|
||||
* Returns: true (1) if environment callback command could
|
||||
* be performed, otherwise false (0).
|
||||
**/
|
||||
static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
static bool retroarch_environment_cb(unsigned cmd, void *data)
|
||||
{
|
||||
unsigned p;
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
@ -10389,9 +10694,9 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (options_v2)
|
||||
{
|
||||
/* Initialise core options */
|
||||
core_option_manager_t *new_vars = rarch_init_core_options(settings, options_v2);
|
||||
core_option_manager_t *new_vars = retroarch_init_core_options(settings, options_v2);
|
||||
if (new_vars)
|
||||
runloop_state.core_options = new_vars;
|
||||
runloop_state.core_options = new_vars;
|
||||
/* Clean up */
|
||||
core_option_manager_free_converted(options_v2);
|
||||
}
|
||||
@ -10422,7 +10727,7 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (options_v2)
|
||||
{
|
||||
/* Initialise core options */
|
||||
core_option_manager_t *new_vars = rarch_init_core_options(settings, options_v2);
|
||||
core_option_manager_t *new_vars = retroarch_init_core_options(settings, options_v2);
|
||||
|
||||
if (new_vars)
|
||||
runloop_state.core_options = new_vars;
|
||||
@ -10456,7 +10761,7 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
|
||||
if (options_v2)
|
||||
{
|
||||
new_vars = rarch_init_core_options(settings, options_v2);
|
||||
new_vars = retroarch_init_core_options(settings, options_v2);
|
||||
if (new_vars)
|
||||
runloop_state.core_options = new_vars;
|
||||
}
|
||||
@ -10496,7 +10801,7 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (options_v2)
|
||||
{
|
||||
/* Initialise core options */
|
||||
new_vars = rarch_init_core_options(settings, options_v2);
|
||||
new_vars = retroarch_init_core_options(settings, options_v2);
|
||||
if (new_vars)
|
||||
runloop_state.core_options = new_vars;
|
||||
|
||||
@ -12003,7 +12308,7 @@ static void libretro_get_environment_info(
|
||||
* Ignore any environment callbacks here in case we're running
|
||||
* on the non-current core. */
|
||||
p_rarch->ignore_environment_cb = true;
|
||||
func(rarch_environment_cb);
|
||||
func(retroarch_environment_cb);
|
||||
p_rarch->ignore_environment_cb = false;
|
||||
}
|
||||
|
||||
@ -12139,7 +12444,7 @@ static bool libretro_get_system_info(
|
||||
* Ignore any environment callbacks here in case we're running
|
||||
* on the non-current core. */
|
||||
p_rarch->ignore_environment_cb = true;
|
||||
retro_set_environment(rarch_environment_cb);
|
||||
retro_set_environment(retroarch_environment_cb);
|
||||
p_rarch->ignore_environment_cb = false;
|
||||
}
|
||||
|
||||
@ -12744,11 +13049,11 @@ end:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static bool rarch_environment_secondary_core_hook(
|
||||
static bool retroarch_environment_secondary_core_hook(
|
||||
unsigned cmd, void *data)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
bool result = rarch_environment_cb(cmd, data);
|
||||
bool result = retroarch_environment_cb(cmd, data);
|
||||
|
||||
if (p_rarch->has_variable_update)
|
||||
{
|
||||
@ -12799,7 +13104,7 @@ static bool secondary_core_create(struct rarch_state *p_rarch,
|
||||
|
||||
p_rarch->secondary_core.symbols_inited = true;
|
||||
p_rarch->secondary_core.retro_set_environment(
|
||||
rarch_environment_secondary_core_hook);
|
||||
retroarch_environment_secondary_core_hook);
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
p_rarch->has_variable_update = true;
|
||||
#endif
|
||||
@ -24430,7 +24735,7 @@ force_input_dirty:
|
||||
}
|
||||
#endif
|
||||
|
||||
static retro_time_t rarch_core_runtime_tick(
|
||||
static retro_time_t retroarch_core_runtime_tick(
|
||||
struct rarch_state *p_rarch,
|
||||
float slowmotion_ratio,
|
||||
retro_time_t current_time)
|
||||
@ -25446,70 +25751,6 @@ static bool retroarch_parse_input_and_config(
|
||||
return verbosity_enabled;
|
||||
}
|
||||
|
||||
static bool retroarch_validate_per_core_options(char *s,
|
||||
size_t len, bool mkdir,
|
||||
const char *core_name, const char *game_name)
|
||||
{
|
||||
char config_directory[PATH_MAX_LENGTH];
|
||||
config_directory[0] = '\0';
|
||||
|
||||
if (!s ||
|
||||
(len < 1) ||
|
||||
string_is_empty(core_name) ||
|
||||
string_is_empty(game_name))
|
||||
return false;
|
||||
|
||||
fill_pathname_application_special(config_directory,
|
||||
sizeof(config_directory), APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
fill_pathname_join_special_ext(s,
|
||||
config_directory, core_name, game_name,
|
||||
".opt", len);
|
||||
|
||||
/* No need to make a directory if file already exists... */
|
||||
if (mkdir && !path_is_valid(s))
|
||||
{
|
||||
char new_path[PATH_MAX_LENGTH];
|
||||
new_path[0] = '\0';
|
||||
|
||||
fill_pathname_join(new_path,
|
||||
config_directory, core_name, sizeof(new_path));
|
||||
|
||||
if (!path_is_directory(new_path))
|
||||
path_mkdir(new_path);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool retroarch_validate_game_options(
|
||||
const char *core_name,
|
||||
char *s, size_t len, bool mkdir)
|
||||
{
|
||||
const char *game_name = path_basename(path_get(RARCH_PATH_BASENAME));
|
||||
return retroarch_validate_per_core_options(s, len, mkdir,
|
||||
core_name, game_name);
|
||||
}
|
||||
|
||||
static bool retroarch_validate_folder_options(
|
||||
char *s, size_t len, bool mkdir)
|
||||
{
|
||||
char folder_name[PATH_MAX_LENGTH];
|
||||
const char *core_name = runloop_state.system.info.library_name;
|
||||
const char *game_path = path_get(RARCH_PATH_BASENAME);
|
||||
|
||||
folder_name[0] = '\0';
|
||||
|
||||
if (string_is_empty(game_path))
|
||||
return false;
|
||||
|
||||
fill_pathname_parent_dir_name(folder_name,
|
||||
game_path, sizeof(folder_name));
|
||||
|
||||
return retroarch_validate_per_core_options(s, len, mkdir,
|
||||
core_name, folder_name);
|
||||
}
|
||||
|
||||
/* Validates CPU features for given processor architecture.
|
||||
* Make sure we haven't compiled for something we cannot run.
|
||||
* Ideally, code would get swapped out depending on CPU support,
|
||||
@ -26191,58 +26432,6 @@ void retroarch_menu_running_finished(bool quit)
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_game_specific_options:
|
||||
*
|
||||
* Returns: true (1) if a game specific core
|
||||
* options path has been found,
|
||||
* otherwise false (0).
|
||||
**/
|
||||
static bool rarch_game_specific_options(char **output)
|
||||
{
|
||||
char game_options_path[PATH_MAX_LENGTH];
|
||||
game_options_path[0] ='\0';
|
||||
|
||||
if (!retroarch_validate_game_options(
|
||||
runloop_state.system.info.library_name,
|
||||
game_options_path,
|
||||
sizeof(game_options_path), false) ||
|
||||
!path_is_valid(game_options_path))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_GAME_SPECIFIC_CORE_OPTIONS_FOUND_AT),
|
||||
game_options_path);
|
||||
*output = strdup(game_options_path);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* rarch_folder_specific_options:
|
||||
*
|
||||
* Returns: true (1) if a folder specific core
|
||||
* options path has been found,
|
||||
* otherwise false (0).
|
||||
**/
|
||||
static bool rarch_folder_specific_options(
|
||||
char **output)
|
||||
{
|
||||
char folder_options_path[PATH_MAX_LENGTH];
|
||||
folder_options_path[0] ='\0';
|
||||
|
||||
if (!retroarch_validate_folder_options(
|
||||
folder_options_path,
|
||||
sizeof(folder_options_path), false) ||
|
||||
!path_is_valid(folder_options_path))
|
||||
return false;
|
||||
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_FOLDER_SPECIFIC_CORE_OPTIONS_FOUND_AT),
|
||||
folder_options_path);
|
||||
*output = strdup(folder_options_path);
|
||||
return true;
|
||||
}
|
||||
|
||||
static void runloop_task_msg_queue_push(
|
||||
retro_task_t *task, const char *msg,
|
||||
unsigned prio, unsigned duration,
|
||||
@ -26297,142 +26486,6 @@ static void runloop_task_msg_queue_push(
|
||||
runloop_msg_queue_push(msg, prio, duration, flush, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
|
||||
/* Fetches core options path for current core/content
|
||||
* - path: path from which options should be read
|
||||
* from/saved to
|
||||
* - src_path: in the event that 'path' file does not
|
||||
* yet exist, provides source path from which initial
|
||||
* options should be extracted
|
||||
*
|
||||
* NOTE: caller must ensure
|
||||
* path and src_path are NULL-terminated
|
||||
* */
|
||||
static void rarch_init_core_options_path(
|
||||
settings_t *settings,
|
||||
char *path, size_t len,
|
||||
char *src_path, size_t src_len)
|
||||
{
|
||||
char *game_options_path = NULL;
|
||||
char *folder_options_path = NULL;
|
||||
|
||||
bool game_specific_options = settings->bools.game_specific_options;
|
||||
|
||||
/* Check whether game-specific options exist */
|
||||
if (game_specific_options &&
|
||||
rarch_game_specific_options(&game_options_path))
|
||||
{
|
||||
/* Notify system that we have a valid core options
|
||||
* override */
|
||||
path_set(RARCH_PATH_CORE_OPTIONS, game_options_path);
|
||||
runloop_state.game_options_active = true;
|
||||
runloop_state.folder_options_active = false;
|
||||
|
||||
/* Copy options path */
|
||||
strlcpy(path, game_options_path, len);
|
||||
|
||||
free(game_options_path);
|
||||
}
|
||||
/* Check whether folder-specific options exist */
|
||||
else if (game_specific_options &&
|
||||
rarch_folder_specific_options(
|
||||
&folder_options_path))
|
||||
{
|
||||
/* Notify system that we have a valid core options
|
||||
* override */
|
||||
path_set(RARCH_PATH_CORE_OPTIONS, folder_options_path);
|
||||
runloop_state.game_options_active = false;
|
||||
runloop_state.folder_options_active = true;
|
||||
|
||||
/* Copy options path */
|
||||
strlcpy(path, folder_options_path, len);
|
||||
|
||||
free(folder_options_path);
|
||||
}
|
||||
else
|
||||
{
|
||||
char global_options_path[PATH_MAX_LENGTH];
|
||||
char per_core_options_path[PATH_MAX_LENGTH];
|
||||
bool per_core_options_exist = false;
|
||||
bool per_core_options = !settings->bools.global_core_options;
|
||||
const char *path_core_options = settings->paths.path_core_options;
|
||||
|
||||
global_options_path[0] = '\0';
|
||||
per_core_options_path[0] = '\0';
|
||||
|
||||
if (per_core_options)
|
||||
{
|
||||
const char *core_name = runloop_state.system.info.library_name;
|
||||
/* Get core-specific options path
|
||||
* > if retroarch_validate_per_core_options() returns
|
||||
* false, then per-core options are disabled (due to
|
||||
* unknown system errors...) */
|
||||
per_core_options = retroarch_validate_per_core_options(
|
||||
per_core_options_path, sizeof(per_core_options_path), true,
|
||||
core_name, core_name);
|
||||
|
||||
/* If we can use per-core options, check whether an options
|
||||
* file already exists */
|
||||
if (per_core_options)
|
||||
per_core_options_exist = path_is_valid(per_core_options_path);
|
||||
}
|
||||
|
||||
/* If not using per-core options, or if a per-core options
|
||||
* file does not yet exist, must fetch 'global' options path */
|
||||
if (!per_core_options || !per_core_options_exist)
|
||||
{
|
||||
const char *options_path = path_core_options;
|
||||
|
||||
if (!string_is_empty(options_path))
|
||||
strlcpy(global_options_path,
|
||||
options_path, sizeof(global_options_path));
|
||||
else if (!path_is_empty(RARCH_PATH_CONFIG))
|
||||
fill_pathname_resolve_relative(
|
||||
global_options_path, path_get(RARCH_PATH_CONFIG),
|
||||
FILE_PATH_CORE_OPTIONS_CONFIG, sizeof(global_options_path));
|
||||
}
|
||||
|
||||
/* Allocate correct path/src_path strings */
|
||||
if (per_core_options)
|
||||
{
|
||||
strlcpy(path, per_core_options_path, len);
|
||||
|
||||
if (!per_core_options_exist)
|
||||
strlcpy(src_path, global_options_path, src_len);
|
||||
}
|
||||
else
|
||||
strlcpy(path, global_options_path, len);
|
||||
|
||||
/* Notify system that we *do not* have a valid core options
|
||||
* options override */
|
||||
runloop_state.game_options_active = false;
|
||||
runloop_state.folder_options_active = false;
|
||||
}
|
||||
}
|
||||
|
||||
static core_option_manager_t *rarch_init_core_options(
|
||||
settings_t *settings,
|
||||
const struct retro_core_options_v2 *options_v2)
|
||||
{
|
||||
bool categories_enabled = settings->bools.core_option_category_enable;
|
||||
char options_path[PATH_MAX_LENGTH];
|
||||
char src_options_path[PATH_MAX_LENGTH];
|
||||
|
||||
/* Ensure these are NULL-terminated */
|
||||
options_path[0] = '\0';
|
||||
src_options_path[0] = '\0';
|
||||
|
||||
/* Get core options file path */
|
||||
rarch_init_core_options_path(settings,
|
||||
options_path, sizeof(options_path),
|
||||
src_options_path, sizeof(src_options_path));
|
||||
|
||||
if (!string_is_empty(options_path))
|
||||
return core_option_manager_new(options_path,
|
||||
src_options_path, options_v2,
|
||||
categories_enabled);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void retroarch_init_task_queue(void)
|
||||
{
|
||||
#ifdef HAVE_THREADS
|
||||
@ -26447,7 +26500,7 @@ void retroarch_init_task_queue(void)
|
||||
task_queue_init(threaded_enable, runloop_task_msg_queue_push);
|
||||
}
|
||||
|
||||
bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
bool retroarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
|
||||
@ -26735,56 +26788,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
|
||||
return true;
|
||||
}
|
||||
|
||||
static void retroarch_deinit_core_options(
|
||||
bool game_options_active,
|
||||
const char *path_core_options,
|
||||
core_option_manager_t *core_options)
|
||||
{
|
||||
/* Check whether game-specific options file is being used */
|
||||
if (!string_is_empty(path_core_options))
|
||||
{
|
||||
config_file_t *conf_tmp = NULL;
|
||||
|
||||
/* We only need to save configuration settings for
|
||||
* the current core
|
||||
* > If game-specific options file exists, have
|
||||
* to read it (to ensure file only gets written
|
||||
* if config values change)
|
||||
* > Otherwise, create a new, empty config_file_t
|
||||
* object */
|
||||
if (path_is_valid(path_core_options))
|
||||
conf_tmp = config_file_new_from_path_to_string(path_core_options);
|
||||
|
||||
if (!conf_tmp)
|
||||
conf_tmp = config_file_new_alloc();
|
||||
|
||||
if (conf_tmp)
|
||||
{
|
||||
core_option_manager_flush(
|
||||
core_options,
|
||||
conf_tmp);
|
||||
RARCH_LOG("[Core Options]: Saved %s-specific core options to \"%s\"\n",
|
||||
game_options_active ? "game" : "folder", path_core_options);
|
||||
config_file_write(conf_tmp, path_core_options, true);
|
||||
config_file_free(conf_tmp);
|
||||
conf_tmp = NULL;
|
||||
}
|
||||
path_clear(RARCH_PATH_CORE_OPTIONS);
|
||||
}
|
||||
else
|
||||
{
|
||||
const char *path = core_options->conf_path;
|
||||
core_option_manager_flush(
|
||||
core_options,
|
||||
core_options->conf);
|
||||
RARCH_LOG("[Core Options]: Saved core options file to \"%s\"\n", path);
|
||||
config_file_write(core_options->conf, path, true);
|
||||
}
|
||||
|
||||
if (core_options)
|
||||
core_option_manager_free(core_options);
|
||||
}
|
||||
|
||||
static core_option_manager_t *retroarch_init_core_variables(
|
||||
settings_t *settings,
|
||||
const struct retro_variable *vars)
|
||||
@ -26797,7 +26800,7 @@ static core_option_manager_t *retroarch_init_core_variables(
|
||||
src_options_path[0] = '\0';
|
||||
|
||||
/* Get core options file path */
|
||||
rarch_init_core_options_path(
|
||||
retroarch_init_core_options_path(
|
||||
settings,
|
||||
options_path, sizeof(options_path),
|
||||
src_options_path, sizeof(src_options_path));
|
||||
@ -27217,7 +27220,7 @@ static bool menu_display_libretro(
|
||||
|
||||
core_run();
|
||||
p_rarch->libretro_core_runtime_usec +=
|
||||
rarch_core_runtime_tick(p_rarch, slowmotion_ratio, current_time);
|
||||
retroarch_core_runtime_tick(p_rarch, slowmotion_ratio, current_time);
|
||||
p_rarch->input_driver_block_libretro_input = false;
|
||||
|
||||
return false;
|
||||
@ -27731,7 +27734,7 @@ static enum runloop_state runloop_check_state(
|
||||
{
|
||||
float target_hz = 0.0;
|
||||
|
||||
rarch_environment_cb(
|
||||
retroarch_environment_cb(
|
||||
RETRO_ENVIRONMENT_GET_TARGET_REFRESH_RATE, &target_hz);
|
||||
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_PRESS_AGAIN_TO_QUIT), 1,
|
||||
@ -28819,7 +28822,7 @@ int runloop_iterate(void)
|
||||
|
||||
/* Increment runtime tick counter after each call to
|
||||
* core_run() or run_ahead() */
|
||||
p_rarch->libretro_core_runtime_usec += rarch_core_runtime_tick(
|
||||
p_rarch->libretro_core_runtime_usec += retroarch_core_runtime_tick(
|
||||
p_rarch,
|
||||
slowmotion_ratio,
|
||||
current_time);
|
||||
|
@ -362,7 +362,7 @@ typedef struct content_state
|
||||
bool pending_rom_crc;
|
||||
} content_state_t;
|
||||
|
||||
bool rarch_ctl(enum rarch_ctl_state state, void *data);
|
||||
bool retroarch_ctl(enum rarch_ctl_state state, void *data);
|
||||
|
||||
int retroarch_get_capabilities(enum rarch_capabilities type,
|
||||
char *s, size_t len);
|
||||
|
@ -43,9 +43,6 @@ static void retroarch_deinit_core_options(
|
||||
static core_option_manager_t *retroarch_init_core_variables(
|
||||
settings_t *settings,
|
||||
const struct retro_variable *vars);
|
||||
static core_option_manager_t *rarch_init_core_options(
|
||||
settings_t *settings,
|
||||
const struct retro_core_options_v2 *options_v2);
|
||||
#ifdef HAVE_RUNAHEAD
|
||||
#if defined(HAVE_DYNAMIC) || defined(HAVE_DYLIB)
|
||||
static bool secondary_core_create(struct rarch_state *p_rarch,
|
||||
@ -131,7 +128,7 @@ static bool core_load(struct rarch_state *p_rarch,
|
||||
unsigned poll_type_behavior);
|
||||
static bool core_unload_game(struct rarch_state *p_rarch);
|
||||
|
||||
static bool rarch_environment_cb(unsigned cmd, void *data);
|
||||
static bool retroarch_environment_cb(unsigned cmd, void *data);
|
||||
|
||||
static void driver_camera_stop(void);
|
||||
static bool driver_camera_start(void);
|
||||
|
@ -725,7 +725,7 @@ bool state_manager_check_rewind(
|
||||
cnt = (cnt + 1) % (rewind_granularity ?
|
||||
rewind_granularity : 1); /* Avoid possible SIGFPE. */
|
||||
|
||||
if ((cnt == 0) || rarch_ctl(RARCH_CTL_BSV_MOVIE_IS_INITED, NULL))
|
||||
if ((cnt == 0) || retroarch_ctl(RARCH_CTL_BSV_MOVIE_IS_INITED, NULL))
|
||||
{
|
||||
void *state = NULL;
|
||||
|
||||
|
@ -1467,7 +1467,7 @@ static bool content_load(content_ctx_info_t *info,
|
||||
rarch_argc_ptr = (int*)&rarch_argc;
|
||||
}
|
||||
|
||||
rarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL);
|
||||
retroarch_ctl(RARCH_CTL_MAIN_DEINIT, NULL);
|
||||
|
||||
wrap_args->argc = *rarch_argc_ptr;
|
||||
wrap_args->argv = rarch_argv_ptr;
|
||||
@ -1739,13 +1739,13 @@ static bool firmware_update_status(
|
||||
core_info->path,
|
||||
firmware_info.directory.system);
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
|
||||
core_info_list_update_missing_firmware(&firmware_info,
|
||||
&set_missing_firmware);
|
||||
|
||||
if (set_missing_firmware)
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
|
||||
if (
|
||||
content_ctx->bios_is_missing &&
|
||||
@ -1781,12 +1781,12 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
|
||||
|
||||
content_ctx.check_firmware_before_loading = check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.bios_is_missing = rarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.bios_is_missing = retroarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
content_ctx.name_ips = NULL;
|
||||
@ -1822,7 +1822,7 @@ bool task_push_start_dummy_core(content_ctx_info_t *content_info)
|
||||
/* Preliminary stuff that has to be done before we
|
||||
* load the actual content. Can differ per mode. */
|
||||
sys_info->load_no_content = false;
|
||||
rarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
retroarch_ctl(RARCH_CTL_STATE_FREE, NULL);
|
||||
task_queue_deinit();
|
||||
retroarch_init_task_queue();
|
||||
|
||||
@ -1878,12 +1878,12 @@ bool task_push_load_content_from_playlist_from_menu(
|
||||
|
||||
content_ctx.check_firmware_before_loading = settings->bools.check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.bios_is_missing = rarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.bios_is_missing = retroarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
content_ctx.name_ips = NULL;
|
||||
@ -1925,7 +1925,7 @@ bool task_push_load_content_from_playlist_from_menu(
|
||||
* > If so, content can be launched directly with
|
||||
* the currently loaded core */
|
||||
if (!force_core_reload &&
|
||||
rarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
retroarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
{
|
||||
if (!content_info->environ_get)
|
||||
content_info->environ_get = menu_content_environment_get;
|
||||
@ -1972,7 +1972,7 @@ bool task_push_load_content_from_playlist_from_menu(
|
||||
/* No dynamic core loading support: if we reach
|
||||
* this point then a new instance has been
|
||||
* forked - have to shut down this one */
|
||||
rarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_SHUTDOWN, NULL);
|
||||
retroarch_menu_running_finished(true);
|
||||
#endif
|
||||
|
||||
@ -2020,12 +2020,12 @@ bool task_push_start_current_core(content_ctx_info_t *content_info)
|
||||
|
||||
content_ctx.check_firmware_before_loading = check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.bios_is_missing = rarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.bios_is_missing = retroarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
content_ctx.name_ips = NULL;
|
||||
@ -2152,7 +2152,7 @@ bool task_push_load_content_with_new_core_from_menu(
|
||||
* just load the content directly */
|
||||
if (!force_core_reload &&
|
||||
(type == CORE_TYPE_PLAIN) &&
|
||||
rarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
retroarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
return task_push_load_content_with_core_from_menu(
|
||||
fullpath, content_info,
|
||||
type, cb, user_data);
|
||||
@ -2160,12 +2160,12 @@ bool task_push_load_content_with_new_core_from_menu(
|
||||
|
||||
content_ctx.check_firmware_before_loading = check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.bios_is_missing = rarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.bios_is_missing = retroarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
content_ctx.name_ips = NULL;
|
||||
@ -2271,12 +2271,12 @@ static bool task_load_content_internal(
|
||||
|
||||
content_ctx.check_firmware_before_loading = check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.bios_is_missing = rarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.bios_is_missing = retroarch_ctl(RARCH_CTL_IS_MISSING_BIOS, NULL);
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
content_ctx.name_ips = NULL;
|
||||
@ -2754,10 +2754,10 @@ bool content_init(void)
|
||||
|
||||
content_ctx.check_firmware_before_loading = check_firmware_before_loading;
|
||||
#ifdef HAVE_PATCH
|
||||
content_ctx.is_ips_pref = rarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = rarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = rarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = rarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
content_ctx.is_ips_pref = retroarch_ctl(RARCH_CTL_IS_IPS_PREF, NULL);
|
||||
content_ctx.is_bps_pref = retroarch_ctl(RARCH_CTL_IS_BPS_PREF, NULL);
|
||||
content_ctx.is_ups_pref = retroarch_ctl(RARCH_CTL_IS_UPS_PREF, NULL);
|
||||
content_ctx.patch_is_blocked = retroarch_ctl(RARCH_CTL_IS_PATCH_BLOCKED, NULL);
|
||||
#endif
|
||||
content_ctx.directory_system = NULL;
|
||||
content_ctx.directory_cache = NULL;
|
||||
|
@ -1061,7 +1061,7 @@ bool task_push_core_restore(const char *backup_path, const char *dir_libretro,
|
||||
|
||||
/* If core to be restored is currently loaded, must
|
||||
* unload it before pushing the task */
|
||||
if (rarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)core_path))
|
||||
{
|
||||
command_event(CMD_EVENT_UNLOAD_CORE, NULL);
|
||||
*core_loaded = true;
|
||||
|
@ -1854,7 +1854,7 @@ void *task_push_play_feature_delivery_core_install(
|
||||
* of an existing core file. If core is
|
||||
* already running, must therefore unload it
|
||||
* to prevent undefined behaviour */
|
||||
if (rarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)list_entry->local_core_path))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_CORE_LOADED, (void*)list_entry->local_core_path))
|
||||
command_event(CMD_EVENT_UNLOAD_CORE, NULL);
|
||||
|
||||
/* Push task */
|
||||
|
@ -1060,15 +1060,15 @@ void CoreOptionsDialog::onCoreOptionComboBoxCurrentIndexChanged(int index)
|
||||
key = combo_box->itemData(index, Qt::UserRole).toString();
|
||||
val = combo_box->itemText(index);
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL))
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_GET_CORE_OPTION_SIZE, &opts);
|
||||
retroarch_ctl(RARCH_CTL_GET_CORE_OPTION_SIZE, &opts);
|
||||
|
||||
if (opts)
|
||||
{
|
||||
core_option_manager_t *coreopts = NULL;
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (coreopts)
|
||||
{
|
||||
@ -1104,13 +1104,13 @@ void CoreOptionsDialog::buildLayout()
|
||||
size_t opts = 0;
|
||||
QFormLayout *form = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool has_core_options = rarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL);
|
||||
bool has_core_options = retroarch_ctl(RARCH_CTL_HAS_CORE_OPTIONS, NULL);
|
||||
|
||||
clearLayout();
|
||||
|
||||
if (has_core_options)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_GET_CORE_OPTION_SIZE, &opts);
|
||||
retroarch_ctl(RARCH_CTL_GET_CORE_OPTION_SIZE, &opts);
|
||||
|
||||
if (opts)
|
||||
{
|
||||
@ -1130,7 +1130,7 @@ void CoreOptionsDialog::buildLayout()
|
||||
|
||||
if (!contentLabel.isEmpty())
|
||||
{
|
||||
if (!rarch_ctl(RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, NULL))
|
||||
if (!retroarch_ctl(RARCH_CTL_IS_GAME_OPTIONS_ACTIVE, NULL))
|
||||
label = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS_CREATE);
|
||||
else
|
||||
label = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS_IN_USE);
|
||||
@ -1151,7 +1151,7 @@ void CoreOptionsDialog::buildLayout()
|
||||
}
|
||||
}
|
||||
|
||||
rarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
retroarch_ctl(RARCH_CTL_CORE_OPTIONS_LIST_GET, &coreopts);
|
||||
|
||||
if (coreopts)
|
||||
{
|
||||
|
@ -674,7 +674,7 @@ static ui_application_t ui_application_cocoa = {
|
||||
{
|
||||
NSApplicationTerminateReply reply = NSTerminateNow;
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_INITED, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_INITED, NULL))
|
||||
reply = NSTerminateCancel;
|
||||
|
||||
command_event(CMD_EVENT_QUIT, NULL);
|
||||
@ -884,7 +884,7 @@ static void open_document_handler(
|
||||
if (sender_tag >= 10 && sender_tag <= 19)
|
||||
{
|
||||
unsigned idx = (sender_tag - (10-1));
|
||||
rarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
retroarch_ctl(RARCH_CTL_SET_WINDOWED_SCALE, &idx);
|
||||
cmd = CMD_EVENT_RESIZE_WINDOWED_SCALE;
|
||||
}
|
||||
|
||||
|
@ -56,8 +56,8 @@ static void rarch_enable_ui(void)
|
||||
|
||||
ui_companion_set_foreground(true);
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
rarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_menu_running();
|
||||
}
|
||||
|
||||
@ -67,8 +67,8 @@ static void rarch_disable_ui(void)
|
||||
|
||||
ui_companion_set_foreground(false);
|
||||
|
||||
rarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
rarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_PAUSED, &boolean);
|
||||
retroarch_ctl(RARCH_CTL_SET_IDLE, &boolean);
|
||||
retroarch_menu_running_finished(false);
|
||||
}
|
||||
|
||||
@ -90,7 +90,7 @@ static void rarch_draw_observer(CFRunLoopObserverRef observer,
|
||||
return;
|
||||
}
|
||||
|
||||
if (rarch_ctl(RARCH_CTL_IS_IDLE, NULL))
|
||||
if (retroarch_ctl(RARCH_CTL_IS_IDLE, NULL))
|
||||
return;
|
||||
CFRunLoopWakeUp(CFRunLoopGetMain());
|
||||
}
|
||||
|
@ -2483,12 +2483,12 @@ QVector<QHash<QString, QString> > MainWindow::getCoreInfo()
|
||||
firmware_info.path = core_info->path;
|
||||
firmware_info.directory.system = settings->paths.directory_system;
|
||||
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
|
||||
update_missing_firmware = core_info_list_update_missing_firmware(&firmware_info, &set_missing_firmware);
|
||||
|
||||
if (set_missing_firmware)
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
retroarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
|
||||
if (update_missing_firmware)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user