mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Cleanups
This commit is contained in:
parent
9852195c93
commit
5a48f32d6b
@ -652,7 +652,7 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_PATH("osk_overlay_directory",
|
||||
global->dir.osk_overlay, true, NULL, true);
|
||||
dir_get_osk_overlay_ptr(), true, NULL, true);
|
||||
#endif
|
||||
#ifndef HAVE_DYNAMIC
|
||||
SETTING_PATH("libretro_path",
|
||||
@ -1248,20 +1248,30 @@ static void config_set_defaults(void)
|
||||
|
||||
if (!string_is_empty(g_defaults.dir.osk_overlay))
|
||||
{
|
||||
fill_pathname_expand_special(global->dir.osk_overlay,
|
||||
g_defaults.dir.osk_overlay, sizeof(global->dir.osk_overlay));
|
||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
fill_pathname_expand_special(temp_path,
|
||||
g_defaults.dir.osk_overlay, sizeof(temp_path));
|
||||
#ifdef RARCH_MOBILE
|
||||
if (string_is_empty(settings->path.osk_overlay))
|
||||
fill_pathname_join(settings->path.osk_overlay,
|
||||
global->dir.osk_overlay,
|
||||
temp_path,
|
||||
"keyboards/modular-keyboard/opaque/big.cfg",
|
||||
sizeof(settings->path.osk_overlay));
|
||||
#endif
|
||||
|
||||
dir_set_osk_overlay(temp_path);
|
||||
}
|
||||
else
|
||||
strlcpy(global->dir.osk_overlay,
|
||||
{
|
||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
strlcpy(temp_path,
|
||||
settings->directory.overlay,
|
||||
sizeof(global->dir.osk_overlay));
|
||||
sizeof(temp_path));
|
||||
|
||||
dir_set_osk_overlay(temp_path);
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
if (!string_is_empty(g_defaults.dir.menu_config))
|
||||
@ -2037,8 +2047,8 @@ static bool config_load_file(const char *path, bool set_defaults,
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (string_is_equal(settings->directory.overlay, "default"))
|
||||
*settings->directory.overlay = '\0';
|
||||
if (string_is_equal(global->dir.osk_overlay, "default"))
|
||||
*global->dir.osk_overlay = '\0';
|
||||
if (string_is_equal(dir_get_osk_overlay(), "default"))
|
||||
dir_clear_osk_overlay();
|
||||
#endif
|
||||
if (string_is_equal(settings->directory.system, "default"))
|
||||
*settings->directory.system = '\0';
|
||||
|
@ -4760,7 +4760,7 @@ static bool setting_append_list(
|
||||
sizeof(settings->path.osk_overlay),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_KEYBOARD_OVERLAY_PRESET),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_KEYBOARD_OVERLAY_PRESET),
|
||||
global->dir.osk_overlay,
|
||||
dir_get_osk_overlay_ptr(),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -6469,8 +6469,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
global->dir.osk_overlay,
|
||||
sizeof(global->dir.osk_overlay),
|
||||
dir_get_osk_overlay_ptr(),
|
||||
dir_get_osk_overlay_size(),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_OSK_OVERLAY_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OSK_OVERLAY_DIRECTORY),
|
||||
g_defaults.dir.osk_overlay,
|
||||
|
10
runloop.h
10
runloop.h
@ -140,14 +140,6 @@ enum runloop_ctl_state
|
||||
RUNLOOP_CTL_HTTPSERVER_DESTROY
|
||||
};
|
||||
|
||||
typedef struct rarch_dir
|
||||
{
|
||||
/* Used on reentrancy to use a savestate dir. */
|
||||
#ifdef HAVE_OVERLAY
|
||||
char osk_overlay[PATH_MAX_LENGTH];
|
||||
#endif
|
||||
} rarch_dir_t;
|
||||
|
||||
typedef struct rarch_resolution
|
||||
{
|
||||
unsigned idx;
|
||||
@ -158,8 +150,6 @@ typedef struct rarch_resolution
|
||||
|
||||
typedef struct global
|
||||
{
|
||||
rarch_dir_t dir;
|
||||
|
||||
struct
|
||||
{
|
||||
bool libretro_device[MAX_USERS];
|
||||
|
Loading…
x
Reference in New Issue
Block a user