mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
Revert "Create dir_get_ptr"
This reverts commit ab7bc7755e8320e6796a3f3dafe82ce7d7fead03.
This commit is contained in:
parent
43466d0fa6
commit
1f4e50a72b
@ -658,9 +658,9 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
||||
SETTING_PATH("audio_filter_dir",
|
||||
settings->directory.audio_filter, true, NULL, true);
|
||||
SETTING_PATH("savefile_directory",
|
||||
dir_get_ptr(RARCH_DIR_SAVEFILE), true, NULL, false);
|
||||
dir_get_savefile_ptr(), true, NULL, false);
|
||||
SETTING_PATH("savestate_directory",
|
||||
dir_get_ptr(RARCH_DIR_SAVESTATE), true, NULL, false);
|
||||
dir_get_savestate_ptr(), true, NULL, false);
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_PATH("rgui_browser_directory",
|
||||
settings->directory.menu_content, true, NULL, true);
|
||||
@ -673,7 +673,7 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
SETTING_PATH("osk_overlay_directory",
|
||||
dir_get_ptr(RARCH_DIR_OSK_OVERLAY), true, NULL, true);
|
||||
dir_get_osk_overlay_ptr(), true, NULL, true);
|
||||
#endif
|
||||
#ifndef HAVE_DYNAMIC
|
||||
SETTING_PATH("libretro_path",
|
||||
|
64
dirs.c
64
dirs.c
@ -190,24 +190,24 @@ bool dir_is_empty(enum rarch_dir_type type)
|
||||
|
||||
/* get size functions */
|
||||
|
||||
size_t dir_get_size(enum rarch_dir_type type)
|
||||
size_t dir_get_system_size(void)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_DIR_SYSTEM:
|
||||
return sizeof(dir_system);
|
||||
case RARCH_DIR_SAVEFILE:
|
||||
return sizeof(dir_savefile);
|
||||
case RARCH_DIR_SAVESTATE:
|
||||
return sizeof(dir_savestate);
|
||||
case RARCH_DIR_OSK_OVERLAY:
|
||||
return sizeof(dir_osk_overlay);
|
||||
case RARCH_DIR_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return sizeof(dir_system);
|
||||
}
|
||||
|
||||
return 0;
|
||||
size_t dir_get_savestate_size(void)
|
||||
{
|
||||
return sizeof(dir_savestate);
|
||||
}
|
||||
|
||||
size_t dir_get_savefile_size(void)
|
||||
{
|
||||
return sizeof(dir_savefile);
|
||||
}
|
||||
|
||||
size_t dir_get_osk_overlay_size(void)
|
||||
{
|
||||
return sizeof(dir_osk_overlay);
|
||||
}
|
||||
|
||||
/* clear functions */
|
||||
@ -244,24 +244,24 @@ void dir_clear_all(void)
|
||||
|
||||
/* get ptr functions */
|
||||
|
||||
char *dir_get_ptr(enum rarch_dir_type type)
|
||||
char *dir_get_osk_overlay_ptr(void)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case RARCH_DIR_SYSTEM:
|
||||
return dir_system;
|
||||
case RARCH_DIR_SAVEFILE:
|
||||
return dir_savefile;
|
||||
case RARCH_DIR_SAVESTATE:
|
||||
return dir_savestate;
|
||||
case RARCH_DIR_OSK_OVERLAY:
|
||||
return dir_osk_overlay;
|
||||
case RARCH_DIR_NONE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return dir_osk_overlay;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
char *dir_get_savefile_ptr(void)
|
||||
{
|
||||
return dir_savefile;
|
||||
}
|
||||
|
||||
char *dir_get_system_ptr(void)
|
||||
{
|
||||
return dir_system;
|
||||
}
|
||||
|
||||
char *dir_get_savestate_ptr(void)
|
||||
{
|
||||
return dir_savestate;
|
||||
}
|
||||
|
||||
/* get functions */
|
||||
|
18
dirs.h
18
dirs.h
@ -54,11 +54,25 @@ void dir_clear_all(void);
|
||||
|
||||
/* get size functions */
|
||||
|
||||
size_t dir_get_size(enum rarch_dir_type type);
|
||||
size_t dir_get_osk_overlay_size(void);
|
||||
|
||||
size_t dir_get_system_size(void);
|
||||
|
||||
size_t dir_get_savestate_size(void);
|
||||
|
||||
size_t dir_get_savefile_size(void);
|
||||
|
||||
/* get ptr functions */
|
||||
|
||||
char *dir_get_ptr(enum rarch_dir_type type);
|
||||
char *dir_get_osk_overlay_ptr(void);
|
||||
|
||||
char *dir_get_savefile_ptr(void);
|
||||
|
||||
char *dir_get_savestate_ptr(void);
|
||||
|
||||
char *dir_get_system_ptr(void);
|
||||
|
||||
char *dir_get_osk_overlay_ptr(void);
|
||||
|
||||
/* get functions */
|
||||
|
||||
|
@ -1037,7 +1037,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
dir_set(RARCH_DIR_SYSTEM, temp_path);
|
||||
}
|
||||
|
||||
*(const char**)data = dir_get_ptr(RARCH_DIR_SYSTEM);
|
||||
*(const char**)data = dir_get_system_ptr();
|
||||
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n",
|
||||
dir_get(RARCH_DIR_SYSTEM));
|
||||
}
|
||||
|
@ -4804,7 +4804,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),
|
||||
dir_get_ptr(RARCH_DIR_OSK_OVERLAY),
|
||||
dir_get_osk_overlay_ptr(),
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
@ -6513,8 +6513,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
dir_get_ptr(RARCH_DIR_OSK_OVERLAY),
|
||||
dir_get_size(RARCH_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,
|
||||
@ -6589,8 +6589,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
dir_get_ptr(RARCH_DIR_SAVEFILE),
|
||||
dir_get_size(RARCH_DIR_SAVEFILE),
|
||||
dir_get_savefile_ptr(),
|
||||
dir_get_savefile_size(),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVEFILE_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY),
|
||||
"",
|
||||
@ -6604,8 +6604,8 @@ static bool setting_append_list(
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
dir_get_ptr(RARCH_DIR_SAVESTATE),
|
||||
dir_get_size(RARCH_DIR_SAVESTATE),
|
||||
dir_get_savestate_ptr(),
|
||||
dir_get_savestate_size(),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_DIRECTORY),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY),
|
||||
"",
|
||||
|
Loading…
x
Reference in New Issue
Block a user