mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Move some path settings
This commit is contained in:
parent
829656391a
commit
65dec874a8
@ -1296,9 +1296,9 @@ bool event_cmd_ctl(enum event_command cmd, void *data)
|
||||
return false;
|
||||
RARCH_LOG("%s: [%s].\n",
|
||||
msg_hash_to_str(MSG_LOADING_HISTORY_FILE),
|
||||
settings->content_history_path);
|
||||
settings->path.content_history);
|
||||
g_defaults.history = content_playlist_init(
|
||||
settings->content_history_path,
|
||||
settings->path.content_history,
|
||||
settings->content_history_size);
|
||||
break;
|
||||
case EVENT_CMD_CORE_INFO_DEINIT:
|
||||
|
@ -729,7 +729,7 @@ static void config_set_defaults(void)
|
||||
if (!global->has_set.state_path)
|
||||
*global->dir.savestate = '\0';
|
||||
|
||||
*settings->libretro_info_path = '\0';
|
||||
*settings->path.libretro_info = '\0';
|
||||
if (!global->has_set.libretro_directory)
|
||||
*settings->directory.libretro = '\0';
|
||||
*settings->directory.cursor = '\0';
|
||||
@ -758,24 +758,25 @@ static void config_set_defaults(void)
|
||||
*global->record.output_dir = '\0';
|
||||
*global->record.config_dir = '\0';
|
||||
|
||||
*settings->path.core_options = '\0';
|
||||
*settings->path.content_history = '\0';
|
||||
*settings->path.cheat_settings = '\0';
|
||||
*settings->path.shader = '\0';
|
||||
#ifndef IOS
|
||||
*settings->path.bundle_assets_src = '\0';
|
||||
*settings->path.bundle_assets_dst = '\0';
|
||||
*settings->path.bundle_assets_dst_subdir = '\0';
|
||||
#endif
|
||||
|
||||
settings->bundle_assets_extract_version_current = 0;
|
||||
settings->bundle_assets_extract_last_version = 0;
|
||||
#ifndef IOS
|
||||
*settings->bundle_assets_src_path = '\0';
|
||||
*settings->bundle_assets_dst_path = '\0';
|
||||
*settings->bundle_assets_dst_path_subdir = '\0';
|
||||
#endif
|
||||
*settings->playlist_names = '\0';
|
||||
*settings->playlist_cores = '\0';
|
||||
*settings->core_options_path = '\0';
|
||||
*settings->content_history_path = '\0';
|
||||
*settings->directory.content_history = '\0';
|
||||
*settings->content_database = '\0';
|
||||
*settings->cheat_database = '\0';
|
||||
*settings->cheat_settings_path = '\0';
|
||||
*settings->input.autoconfig_dir = '\0';
|
||||
*settings->input.overlay = '\0';
|
||||
*settings->video.shader_path = '\0';
|
||||
*settings->video.shader_dir = '\0';
|
||||
*settings->video.filter_dir = '\0';
|
||||
*settings->audio.filter_dir = '\0';
|
||||
@ -849,8 +850,8 @@ static void config_set_defaults(void)
|
||||
strlcpy(settings->cheat_database, g_defaults.dir.cheats,
|
||||
sizeof(settings->cheat_database));
|
||||
if (*g_defaults.dir.core_info)
|
||||
fill_pathname_expand_special(settings->libretro_info_path,
|
||||
g_defaults.dir.core_info, sizeof(settings->libretro_info_path));
|
||||
fill_pathname_expand_special(settings->path.libretro_info,
|
||||
g_defaults.dir.core_info, sizeof(settings->path.libretro_info));
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (*g_defaults.dir.overlay)
|
||||
{
|
||||
@ -1408,12 +1409,12 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.aspect_ratio_auto, "video_aspect_ratio_auto");
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, video.refresh_rate, "video_refresh_rate");
|
||||
|
||||
config_get_path(conf, "video_shader", settings->video.shader_path, sizeof(settings->video.shader_path));
|
||||
config_get_path(conf, "video_shader", settings->path.shader, sizeof(settings->path.shader));
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.shader_enable, "video_shader_enable");
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.allow_rotate, "video_allow_rotate");
|
||||
|
||||
config_get_path(conf, "video_font_path", settings->video.font_path, sizeof(settings->video.font_path));
|
||||
config_get_path(conf, "video_font_path", settings->path.font, sizeof(settings->path.font));
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, video.font_size, "video_font_size");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, video.font_enable, "video_font_enable");
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, video.msg_pos_x, "video_message_pos_x");
|
||||
@ -1562,10 +1563,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
config_get_array(conf, "input_joypad_driver", settings->input.joypad_driver, sizeof(settings->input.joypad_driver));
|
||||
config_get_array(conf, "input_keyboard_layout", settings->input.keyboard_layout, sizeof(settings->input.keyboard_layout));
|
||||
|
||||
#if 0
|
||||
if (!global->has_set.libretro)
|
||||
config_get_path(conf, "libretro_path", settings->libretro, sizeof(settings->libretro));
|
||||
#endif
|
||||
if (!global->has_set.libretro_directory)
|
||||
config_get_path(conf, "libretro_directory", settings->directory.libretro, sizeof(settings->directory.libretro));
|
||||
|
||||
@ -1585,9 +1582,9 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, multimedia.builtin_mediaplayer_enable, "builtin_mediaplayer_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, multimedia.builtin_imageviewer_enable, "builtin_imageviewer_enable");
|
||||
|
||||
config_get_path(conf, "libretro_info_path", settings->libretro_info_path, sizeof(settings->libretro_info_path));
|
||||
config_get_path(conf, "libretro_info_path", settings->path.libretro_info, sizeof(settings->path.libretro_info));
|
||||
|
||||
config_get_path(conf, "core_options_path", settings->core_options_path, sizeof(settings->core_options_path));
|
||||
config_get_path(conf, "core_options_path", settings->path.core_options, sizeof(settings->path.core_options));
|
||||
config_get_path(conf, "screenshot_directory", settings->directory.screenshot, sizeof(settings->directory.screenshot));
|
||||
if (*settings->directory.screenshot)
|
||||
{
|
||||
@ -1705,9 +1702,9 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, bundle_assets_extract_enable, "bundle_assets_extract_enable");
|
||||
CONFIG_GET_INT_BASE(conf, settings, bundle_assets_extract_version_current, "bundle_assets_extract_version_current");
|
||||
CONFIG_GET_INT_BASE(conf, settings, bundle_assets_extract_last_version, "bundle_assets_extract_last_version");
|
||||
config_get_array(conf, "bundle_assets_src_path", settings->bundle_assets_src_path, sizeof(settings->bundle_assets_src_path));
|
||||
config_get_array(conf, "bundle_assets_dst_path", settings->bundle_assets_dst_path, sizeof(settings->bundle_assets_dst_path));
|
||||
config_get_array(conf, "bundle_assets_dst_path_subdir", settings->bundle_assets_dst_path_subdir, sizeof(settings->bundle_assets_dst_path_subdir));
|
||||
config_get_array(conf, "bundle_assets_src_path", settings->path.bundle_assets_src, sizeof(settings->path.bundle_assets_src));
|
||||
config_get_array(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst, sizeof(settings->path.bundle_assets_dst));
|
||||
config_get_array(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir, sizeof(settings->path.bundle_assets_dst_subdir));
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, rewind_granularity, "rewind_granularity");
|
||||
CONFIG_GET_FLOAT_BASE(conf, settings, slowmotion_ratio, "slowmotion_ratio");
|
||||
@ -1731,7 +1728,7 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
config_get_path(conf, "cursor_directory",
|
||||
settings->directory.cursor, sizeof(settings->directory.cursor));
|
||||
config_get_path(conf, "cheat_settings_path",
|
||||
settings->cheat_settings_path, sizeof(settings->cheat_settings_path));
|
||||
settings->path.cheat_settings, sizeof(settings->path.cheat_settings));
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, block_sram_overwrite, "block_sram_overwrite");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, savestate_auto_index, "savestate_auto_index");
|
||||
@ -1769,8 +1766,8 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, history_list_enable, "history_list_enable");
|
||||
|
||||
config_get_path(conf, "content_history_path", settings->content_history_path,
|
||||
sizeof(settings->content_history_path));
|
||||
config_get_path(conf, "content_history_path", settings->path.content_history,
|
||||
sizeof(settings->path.content_history));
|
||||
CONFIG_GET_INT_BASE(conf, settings, content_history_size, "content_history_size");
|
||||
|
||||
CONFIG_GET_INT_BASE(conf, settings, input.turbo_period, "input_turbo_period");
|
||||
@ -1837,20 +1834,22 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
RARCH_WARN("savestate_directory is not a directory, ignoring ...\n");
|
||||
}
|
||||
|
||||
if (string_is_empty(settings->content_history_path))
|
||||
if (string_is_empty(settings->path.content_history))
|
||||
{
|
||||
if (string_is_empty(settings->directory.content_history))
|
||||
{
|
||||
fill_pathname_resolve_relative(settings->content_history_path,
|
||||
global->path.config, "content_history.lpl",
|
||||
sizeof(settings->content_history_path));
|
||||
fill_pathname_resolve_relative(
|
||||
settings->path.content_history,
|
||||
global->path.config,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(settings->content_history_path,
|
||||
fill_pathname_join(settings->path.content_history,
|
||||
settings->directory.content_history,
|
||||
"content_history.lpl",
|
||||
sizeof(settings->content_history_path));
|
||||
sizeof(settings->path.content_history));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2594,17 +2593,19 @@ bool config_save_file(const char *path)
|
||||
settings->multimedia.builtin_imageviewer_enable);
|
||||
config_set_bool(conf, "fps_show", settings->fps_show);
|
||||
config_set_bool(conf, "ui_menubar_enable", settings->ui.menubar_enable);
|
||||
#if 0
|
||||
config_set_path(conf, "libretro_path", settings->libretro);
|
||||
#endif
|
||||
config_set_path(conf, "core_options_path", settings->core_options_path);
|
||||
|
||||
config_set_path(conf, "core_options_path", settings->path.core_options);
|
||||
config_set_path(conf, "libretro_info_path", settings->path.libretro_info);
|
||||
config_set_path(conf, "video_shader", settings->path.shader);
|
||||
config_set_string(conf, "bundle_assets_src_path", settings->path.bundle_assets_src);
|
||||
config_set_string(conf, "bundle_assets_dst_path", settings->path.bundle_assets_dst);
|
||||
config_set_string(conf, "bundle_assets_dst_path_subdir", settings->path.bundle_assets_dst_subdir);
|
||||
|
||||
config_set_path(conf, "recording_output_directory", global->record.output_dir);
|
||||
config_set_path(conf, "recording_config_directory", global->record.config_dir);
|
||||
|
||||
config_set_bool(conf, "suspend_screensaver_enable", settings->ui.suspend_screensaver_enable);
|
||||
config_set_path(conf, "libretro_directory", settings->directory.libretro);
|
||||
config_set_path(conf, "libretro_info_path", settings->libretro_info_path);
|
||||
config_set_path(conf, "content_database_path", settings->content_database);
|
||||
config_set_path(conf, "cheat_database_path", settings->cheat_database);
|
||||
config_set_path(conf, "cursor_directory", settings->directory.cursor);
|
||||
@ -2614,7 +2615,6 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "audio_sync", settings->audio.sync);
|
||||
config_set_int(conf, "audio_block_frames", settings->audio.block_frames);
|
||||
config_set_int(conf, "rewind_granularity", settings->rewind_granularity);
|
||||
config_set_path(conf, "video_shader", settings->video.shader_path);
|
||||
config_set_bool(conf, "video_shader_enable",
|
||||
settings->video.shader_enable);
|
||||
config_set_float(conf, "video_aspect_ratio", settings->video.aspect_ratio);
|
||||
@ -2639,9 +2639,6 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "bundle_assets_extract_enable", settings->bundle_assets_extract_enable);
|
||||
config_set_int(conf, "bundle_assets_extract_version_current", settings->bundle_assets_extract_version_current);
|
||||
config_set_int(conf, "bundle_assets_extract_last_version", settings->bundle_assets_extract_last_version);
|
||||
config_set_string(conf, "bundle_assets_src_path", settings->bundle_assets_src_path);
|
||||
config_set_string(conf, "bundle_assets_dst_path", settings->bundle_assets_dst_path);
|
||||
config_set_string(conf, "bundle_assets_dst_path_subdir", settings->bundle_assets_dst_path_subdir);
|
||||
config_set_string(conf, "playlist_names", settings->playlist_names);
|
||||
config_set_string(conf, "playlist_cores", settings->playlist_cores);
|
||||
config_set_float(conf, "video_refresh_rate", settings->video.refresh_rate);
|
||||
@ -2813,7 +2810,7 @@ bool config_save_file(const char *path)
|
||||
settings->menu.title_color);
|
||||
#endif
|
||||
|
||||
config_set_path(conf, "content_history_path", settings->content_history_path);
|
||||
config_set_path(conf, "content_history_path", settings->path.content_history);
|
||||
config_set_int(conf, "content_history_size", settings->content_history_size);
|
||||
config_set_path(conf, "joypad_autoconfig_dir",
|
||||
settings->input.autoconfig_dir);
|
||||
@ -2838,7 +2835,7 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf, "input_osk_overlay_enable", settings->osk.enable);
|
||||
#endif
|
||||
|
||||
config_set_path(conf, "video_font_path", settings->video.font_path);
|
||||
config_set_path(conf, "video_font_path", settings->path.font);
|
||||
config_set_float(conf, "video_message_pos_x", settings->video.msg_pos_x);
|
||||
config_set_float(conf, "video_message_pos_y", settings->video.msg_pos_y);
|
||||
|
||||
|
@ -72,7 +72,6 @@ typedef struct settings
|
||||
unsigned aspect_ratio_idx;
|
||||
unsigned rotation;
|
||||
|
||||
char shader_path[PATH_MAX_LENGTH];
|
||||
bool shader_enable;
|
||||
|
||||
char softfilter_plugin[PATH_MAX_LENGTH];
|
||||
@ -82,7 +81,6 @@ typedef struct settings
|
||||
char filter_dir[PATH_MAX_LENGTH];
|
||||
char shader_dir[PATH_MAX_LENGTH];
|
||||
|
||||
char font_path[PATH_MAX_LENGTH];
|
||||
float font_size;
|
||||
bool font_enable;
|
||||
float msg_pos_x;
|
||||
@ -317,9 +315,19 @@ typedef struct settings
|
||||
bool bundle_assets_extract_enable;
|
||||
unsigned bundle_assets_extract_version_current;
|
||||
unsigned bundle_assets_extract_last_version;
|
||||
char bundle_assets_src_path[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst_path[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst_path_subdir[PATH_MAX_LENGTH];
|
||||
|
||||
struct
|
||||
{
|
||||
char core_options[PATH_MAX_LENGTH];
|
||||
char content_history[PATH_MAX_LENGTH];
|
||||
char libretro_info[PATH_MAX_LENGTH];
|
||||
char cheat_settings[PATH_MAX_LENGTH];
|
||||
char bundle_assets_src[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst[PATH_MAX_LENGTH];
|
||||
char bundle_assets_dst_subdir[PATH_MAX_LENGTH];
|
||||
char shader[PATH_MAX_LENGTH];
|
||||
char font[PATH_MAX_LENGTH];
|
||||
} path;
|
||||
|
||||
struct
|
||||
{
|
||||
@ -341,16 +349,12 @@ typedef struct settings
|
||||
char menu_content[PATH_MAX_LENGTH];
|
||||
} directory;
|
||||
|
||||
char core_options_path[PATH_MAX_LENGTH];
|
||||
char content_history_path[PATH_MAX_LENGTH];
|
||||
unsigned content_history_size;
|
||||
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
unsigned libretro_log_level;
|
||||
char libretro_info_path[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char cheat_settings_path[PATH_MAX_LENGTH];
|
||||
|
||||
bool auto_screenshot_filename;
|
||||
|
||||
|
@ -181,8 +181,8 @@ static config_file_t *core_info_list_iterate(
|
||||
|
||||
strlcat(info_path_base, ".info", sizeof(info_path_base));
|
||||
|
||||
fill_pathname_join(info_path, (*settings->libretro_info_path) ?
|
||||
settings->libretro_info_path : settings->directory.libretro,
|
||||
fill_pathname_join(info_path, (*settings->path.libretro_info) ?
|
||||
settings->path.libretro_info : settings->directory.libretro,
|
||||
info_path_base, sizeof(info_path));
|
||||
|
||||
return config_file_new(info_path);
|
||||
|
@ -801,11 +801,11 @@ static bool d3d_initialize(d3d_video_t *d3d, const video_info_t *info)
|
||||
width, height, false, true);
|
||||
|
||||
#if defined(_XBOX360)
|
||||
strlcpy(settings->video.font_path, "game:\\media\\Arial_12.xpr",
|
||||
sizeof(settings->video.font_path));
|
||||
strlcpy(settings->path.font, "game:\\media\\Arial_12.xpr",
|
||||
sizeof(settings->path.font));
|
||||
#endif
|
||||
if (!font_driver_init_first(NULL, NULL,
|
||||
d3d, settings->video.font_path, 0, false, FONT_DRIVER_RENDER_DIRECT3D_API))
|
||||
d3d, settings->path.font, 0, false, FONT_DRIVER_RENDER_DIRECT3D_API))
|
||||
{
|
||||
RARCH_ERR("[D3D]: Failed to initialize font renderer.\n");
|
||||
return false;
|
||||
@ -1054,9 +1054,9 @@ static bool d3d_construct(d3d_video_t *d3d,
|
||||
* to avoid set_shader() to be overridden
|
||||
* later. */
|
||||
enum rarch_shader_type type =
|
||||
video_shader_parse_type(settings->video.shader_path, RARCH_SHADER_NONE);
|
||||
video_shader_parse_type(settings->path.shader, RARCH_SHADER_NONE);
|
||||
if (settings->video.shader_enable && type == RARCH_SHADER_CG)
|
||||
d3d->shader_path = settings->video.shader_path;
|
||||
d3d->shader_path = settings->path.shader;
|
||||
|
||||
if (!d3d_process_shader(d3d))
|
||||
return false;
|
||||
|
@ -325,7 +325,7 @@ static bool xdk_renderchain_init_shader(void *data, void *renderchain_data)
|
||||
|
||||
#if defined(HAVE_HLSL)
|
||||
RARCH_LOG("D3D]: Using HLSL shader backend.\n");
|
||||
shader_path = settings->video.shader_path;
|
||||
shader_path = settings->path.shader;
|
||||
const shader_backend_t *shader = &hlsl_backend;
|
||||
|
||||
return video_shader_driver_init(hlsl_backend, d3d, shader_path);
|
||||
|
@ -238,7 +238,7 @@ static bool gl_shader_init(gl_t *gl)
|
||||
enum rarch_shader_type type;
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_path = (settings->video.shader_enable
|
||||
&& *settings->video.shader_path) ? settings->video.shader_path : NULL;
|
||||
&& *settings->path.shader) ? settings->path.shader : NULL;
|
||||
|
||||
if (!gl)
|
||||
{
|
||||
@ -2879,8 +2879,8 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
|
||||
if (settings->video.font_enable)
|
||||
{
|
||||
if (!font_driver_init_first(NULL, NULL, gl, *settings->video.font_path
|
||||
? settings->video.font_path : NULL, settings->video.font_size, false,
|
||||
if (!font_driver_init_first(NULL, NULL, gl, *settings->path.font
|
||||
? settings->path.font : NULL, settings->video.font_size, false,
|
||||
FONT_DRIVER_RENDER_OPENGL_API))
|
||||
RARCH_ERR("[GL]: Failed to initialize font renderer.\n");
|
||||
}
|
||||
|
@ -829,7 +829,7 @@ static void omap_init_font(omap_video_t *vid, const char *font_path, unsigned fo
|
||||
return;
|
||||
|
||||
if (!(font_renderer_create_default(&vid->font_driver, &vid->font,
|
||||
*settings->video.font_path ? settings->video.font_path : NULL, settings->video.font_size)))
|
||||
*settings->path.font ? settings->path.font : NULL, settings->video.font_size)))
|
||||
{
|
||||
RARCH_LOG("[video_omap]: font init failed\n");
|
||||
return;
|
||||
@ -956,7 +956,7 @@ static void *omap_gfx_init(const video_info_t *video,
|
||||
if (input && input_data)
|
||||
*input = NULL;
|
||||
|
||||
omap_init_font(vid, settings->video.font_path, settings->video.font_size);
|
||||
omap_init_font(vid, settings->path.font, settings->video.font_size);
|
||||
|
||||
vid->menu.frame = calloc(vid->width * vid->height, vid->bytes_per_pixel);
|
||||
if (!vid->menu.frame)
|
||||
|
@ -455,7 +455,7 @@ static void *sdl2_gfx_init(const video_info_t *video,
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
sdl2_init_renderer(vid);
|
||||
sdl2_init_font(vid, settings->video.font_path, settings->video.font_size);
|
||||
sdl2_init_font(vid, settings->path.font, settings->video.font_size);
|
||||
|
||||
sdl2_gfx_set_handles(vid);
|
||||
|
||||
|
@ -116,7 +116,7 @@ static void sdl_init_font(sdl_video_t *vid, const char *font_path, unsigned font
|
||||
return;
|
||||
|
||||
if (!font_renderer_create_default((const void**)&vid->font_driver, &vid->font,
|
||||
*settings->video.font_path ? settings->video.font_path : NULL,
|
||||
*settings->path.font ? settings->path.font : NULL,
|
||||
settings->video.font_size))
|
||||
{
|
||||
RARCH_LOG("[SDL]: Could not initialize fonts.\n");
|
||||
@ -311,7 +311,7 @@ static void *sdl_gfx_init(const video_info_t *video, const input_driver_t **inpu
|
||||
}
|
||||
}
|
||||
|
||||
sdl_init_font(vid, settings->video.font_path, settings->video.font_size);
|
||||
sdl_init_font(vid, settings->path.font, settings->video.font_size);
|
||||
|
||||
vid->scaler.scaler_type = video->smooth ? SCALER_TYPE_BILINEAR : SCALER_TYPE_POINT;
|
||||
vid->scaler.in_fmt = video->rgb32 ? SCALER_FMT_ARGB8888 : SCALER_FMT_RGB565;
|
||||
|
@ -186,7 +186,7 @@ static void *vg_init(const video_info_t *video,
|
||||
|
||||
if ( settings->video.font_enable
|
||||
&& font_renderer_create_default((const void**)&vg->font_driver, &vg->mFontRenderer,
|
||||
*settings->video.font_path ? settings->video.font_path : NULL, settings->video.font_size))
|
||||
*settings->path.font ? settings->path.font : NULL, settings->video.font_size))
|
||||
{
|
||||
vg->mFont = vgCreateFont(0);
|
||||
|
||||
|
@ -135,8 +135,8 @@ static void *vita2d_gfx_init(const video_info_t *video,
|
||||
#ifdef HAVE_OVERLAY
|
||||
vita->overlay_enable = false;
|
||||
#endif
|
||||
if (!font_driver_init_first(NULL, NULL, vita, *settings->video.font_path
|
||||
? settings->video.font_path : NULL, settings->video.font_size, false,
|
||||
if (!font_driver_init_first(NULL, NULL, vita, *settings->path.font
|
||||
? settings->path.font : NULL, settings->video.font_size, false,
|
||||
FONT_DRIVER_RENDER_VITA2D))
|
||||
{
|
||||
RARCH_ERR("Font: Failed to initialize font renderer.\n");
|
||||
|
@ -636,8 +636,8 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path)
|
||||
static bool vulkan_init_filter_chain(vk_t *vk)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_path = (settings->video.shader_enable && *settings->video.shader_path) ?
|
||||
settings->video.shader_path : NULL;
|
||||
const char *shader_path = (settings->video.shader_enable && *settings->path.shader) ?
|
||||
settings->path.shader : NULL;
|
||||
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_path, RARCH_SHADER_NONE);
|
||||
|
||||
@ -997,8 +997,8 @@ static void *vulkan_init(const video_info_t *video,
|
||||
|
||||
if (settings->video.font_enable)
|
||||
{
|
||||
if (!font_driver_init_first(NULL, NULL, vk, *settings->video.font_path
|
||||
? settings->video.font_path : NULL, settings->video.font_size, false,
|
||||
if (!font_driver_init_first(NULL, NULL, vk, *settings->path.font
|
||||
? settings->path.font : NULL, settings->video.font_size, false,
|
||||
FONT_DRIVER_RENDER_VULKAN_API))
|
||||
RARCH_ERR("[Vulkan]: Failed to initialize font renderer.\n");
|
||||
}
|
||||
|
@ -131,8 +131,8 @@ static void xv_init_font(xv_t *xv, const char *font_path, unsigned font_size)
|
||||
return;
|
||||
|
||||
if (font_renderer_create_default((const void**)&xv->font_driver,
|
||||
&xv->font, *settings->video.font_path
|
||||
? settings->video.font_path : NULL, settings->video.font_size))
|
||||
&xv->font, *settings->path.font
|
||||
? settings->path.font : NULL, settings->video.font_size))
|
||||
{
|
||||
int r, g, b;
|
||||
r = settings->video.msg_color_r * 255;
|
||||
@ -584,7 +584,7 @@ static void *xv_init(const video_info_t *video,
|
||||
}
|
||||
|
||||
xv_init_yuv_tables(xv);
|
||||
xv_init_font(xv, settings->video.font_path, settings->video.font_size);
|
||||
xv_init_font(xv, settings->path.font, settings->video.font_size);
|
||||
|
||||
if (!x11_input_ctx_new(true))
|
||||
goto error;
|
||||
|
@ -1320,7 +1320,7 @@ static void cb_generic_download(void *task_data,
|
||||
dir_path = settings->directory.core_assets;
|
||||
break;
|
||||
case CB_UPDATE_CORE_INFO_FILES:
|
||||
dir_path = settings->libretro_info_path;
|
||||
dir_path = settings->path.libretro_info;
|
||||
break;
|
||||
case CB_UPDATE_ASSETS:
|
||||
dir_path = settings->directory.assets;
|
||||
|
@ -1108,7 +1108,7 @@ static void zarch_context_reset(void *data)
|
||||
font_info.size = zui->font_size;
|
||||
|
||||
if (settings->video.font_enable)
|
||||
font_info.path = settings->video.font_path;
|
||||
font_info.path = settings->path.font;
|
||||
|
||||
if (!menu_display_ctl(MENU_DISPLAY_CTL_FONT_MAIN_INIT, &font_info))
|
||||
RARCH_WARN("Failed to load font.");
|
||||
|
@ -113,8 +113,11 @@ static void print_buf_lines(file_list_t *list, char *buf, int buf_size,
|
||||
char display_name[PATH_MAX_LENGTH];
|
||||
char *last = NULL;
|
||||
|
||||
fill_pathname_join(core_path, settings->libretro_info_path,
|
||||
line_start, sizeof(core_path));
|
||||
fill_pathname_join(
|
||||
core_path,
|
||||
settings->path.libretro_info,
|
||||
line_start,
|
||||
sizeof(core_path));
|
||||
|
||||
path_remove_extension(core_path);
|
||||
path_remove_extension(core_path);
|
||||
@ -218,8 +221,11 @@ static void print_buf_lines_extended(file_list_t *list, char *buf, int buf_size,
|
||||
char display_name[PATH_MAX_LENGTH];
|
||||
char *last = NULL;
|
||||
|
||||
fill_pathname_join(core_path, settings->libretro_info_path,
|
||||
core_pathname, sizeof(core_path));
|
||||
fill_pathname_join(
|
||||
core_path,
|
||||
settings->path.libretro_info,
|
||||
core_pathname,
|
||||
sizeof(core_path));
|
||||
|
||||
path_remove_extension(core_path);
|
||||
path_remove_extension(core_path);
|
||||
@ -3763,7 +3769,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
||||
ret = menu_displaylist_parse_playlist(info,
|
||||
playlist, path_playlist, true);
|
||||
|
||||
strlcpy(menu->db_playlist_file, settings->content_history_path,
|
||||
strlcpy(
|
||||
menu->db_playlist_file,
|
||||
settings->path.content_history,
|
||||
sizeof(menu->db_playlist_file));
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||
|
@ -163,8 +163,8 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
}
|
||||
|
||||
if ( settings->bundle_assets_extract_enable
|
||||
&& !string_is_empty(settings->bundle_assets_src_path)
|
||||
&& !string_is_empty(settings->bundle_assets_dst_path)
|
||||
&& !string_is_empty(settings->path.bundle_assets_src)
|
||||
&& !string_is_empty(settings->path.bundle_assets_dst)
|
||||
#ifdef IOS
|
||||
&& menu_data->push_help_screen
|
||||
#else
|
||||
@ -176,9 +176,9 @@ static bool menu_init(menu_handle_t *menu_data)
|
||||
menu_data->help_screen_type = MENU_HELP_EXTRACT;
|
||||
menu_data->push_help_screen = true;
|
||||
#ifdef HAVE_ZLIB
|
||||
rarch_task_push_decompress(settings->bundle_assets_src_path,
|
||||
settings->bundle_assets_dst_path,
|
||||
NULL, settings->bundle_assets_dst_path_subdir,
|
||||
rarch_task_push_decompress(settings->path.bundle_assets_src,
|
||||
settings->path.bundle_assets_dst,
|
||||
NULL, settings->path.bundle_assets_dst_subdir,
|
||||
NULL, bundle_decompressed, NULL);
|
||||
#endif
|
||||
}
|
||||
|
@ -5466,8 +5466,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_PATH(
|
||||
list, list_info,
|
||||
settings->video.font_path,
|
||||
sizeof(settings->video.font_path),
|
||||
settings->path.font,
|
||||
sizeof(settings->path.font),
|
||||
menu_hash_to_str(MENU_LABEL_VIDEO_FONT_PATH),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_VIDEO_FONT_PATH),
|
||||
"",
|
||||
@ -6930,8 +6930,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
settings->libretro_info_path,
|
||||
sizeof(settings->libretro_info_path),
|
||||
settings->path.libretro_info,
|
||||
sizeof(settings->path.libretro_info),
|
||||
menu_hash_to_str(MENU_LABEL_LIBRETRO_INFO_PATH),
|
||||
menu_hash_to_str(MENU_LABEL_VALUE_LIBRETRO_INFO_PATH),
|
||||
g_defaults.dir.core_info,
|
||||
|
@ -84,7 +84,7 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
sizeof(menu->default_slangp));
|
||||
}
|
||||
|
||||
ext = path_get_extension(settings->video.shader_path);
|
||||
ext = path_get_extension(settings->path.shader);
|
||||
ext_hash = menu_hash_calculate(ext);
|
||||
|
||||
switch (ext_hash)
|
||||
@ -92,13 +92,13 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
case MENU_VALUE_GLSLP:
|
||||
case MENU_VALUE_CGP:
|
||||
case MENU_VALUE_SLANGP:
|
||||
conf = config_file_new(settings->video.shader_path);
|
||||
conf = config_file_new(settings->path.shader);
|
||||
if (conf)
|
||||
{
|
||||
if (video_shader_read_conf_cgp(conf, shader))
|
||||
{
|
||||
video_shader_resolve_relative(shader,
|
||||
settings->video.shader_path);
|
||||
settings->path.shader);
|
||||
video_shader_resolve_parameters(conf, shader);
|
||||
}
|
||||
config_file_free(conf);
|
||||
@ -107,7 +107,7 @@ void menu_shader_manager_init(menu_handle_t *menu)
|
||||
case MENU_VALUE_GLSL:
|
||||
case MENU_VALUE_CG:
|
||||
case MENU_VALUE_SLANG:
|
||||
strlcpy(shader->pass[0].source.path, settings->video.shader_path,
|
||||
strlcpy(shader->pass[0].source.path, settings->path.shader,
|
||||
sizeof(shader->pass[0].source.path));
|
||||
shader->passes = 1;
|
||||
break;
|
||||
@ -172,9 +172,9 @@ void menu_shader_manager_set_preset(struct video_shader *shader,
|
||||
|
||||
/* Makes sure that we use Menu Preset shader on driver reinit.
|
||||
* Only do this when the cgp actually works to avoid potential errors. */
|
||||
strlcpy(settings->video.shader_path,
|
||||
strlcpy(settings->path.shader,
|
||||
preset_path ? preset_path : "",
|
||||
sizeof(settings->video.shader_path));
|
||||
sizeof(settings->path.shader));
|
||||
settings->video.shader_enable = true;
|
||||
|
||||
if (!preset_path || !shader)
|
||||
|
@ -1118,7 +1118,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
||||
bool ret = false;
|
||||
char buf[PATH_MAX_LENGTH] = {0};
|
||||
global_t *global = global_get_ptr();
|
||||
const char *options_path = settings->core_options_path;
|
||||
const char *options_path = settings->path.core_options;
|
||||
const struct retro_variable *vars =
|
||||
(const struct retro_variable*)data;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user