mirror of
https://github.com/libretro/RetroArch
synced 2025-04-23 11:43:20 +00:00
Revert "Add record dirs to dirs.c"
This reverts commit fe3281e05dc48979c04a24c468e6858e9c247de0.
This commit is contained in:
parent
4212c42c56
commit
5a3e5f85a5
@ -575,6 +575,7 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
|||||||
{
|
{
|
||||||
unsigned count = 0;
|
unsigned count = 0;
|
||||||
struct config_path_setting *tmp = NULL;
|
struct config_path_setting *tmp = NULL;
|
||||||
|
global_t *global = global_get_ptr();
|
||||||
|
|
||||||
/* Paths */
|
/* Paths */
|
||||||
#ifdef HAVE_XMB
|
#ifdef HAVE_XMB
|
||||||
@ -589,9 +590,9 @@ static int populate_settings_path(settings_t *settings, struct config_path_setti
|
|||||||
SETTING_PATH("netplay_ip_address", path_get_ptr(RARCH_PATH_SERVER), false, NULL, true);
|
SETTING_PATH("netplay_ip_address", path_get_ptr(RARCH_PATH_SERVER), false, NULL, true);
|
||||||
#endif
|
#endif
|
||||||
SETTING_PATH("recording_output_directory",
|
SETTING_PATH("recording_output_directory",
|
||||||
dir_get_ptr(RARCH_DIR_RECORD_OUTPUT), false, NULL, true);
|
global->record.output_dir, false, NULL, true);
|
||||||
SETTING_PATH("recording_config_directory",
|
SETTING_PATH("recording_config_directory",
|
||||||
dir_get_ptr(RARCH_DIR_RECORD_CONFIG), false, NULL, true);
|
global->record.config_dir, false, NULL, true);
|
||||||
SETTING_PATH("libretro_directory",
|
SETTING_PATH("libretro_directory",
|
||||||
settings->directory.libretro, false, NULL, false);
|
settings->directory.libretro, false, NULL, false);
|
||||||
SETTING_PATH("core_options_path",
|
SETTING_PATH("core_options_path",
|
||||||
@ -1176,8 +1177,8 @@ static void config_set_defaults(void)
|
|||||||
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL))
|
if (!retroarch_override_setting_is_set(RARCH_OVERRIDE_SETTING_IPS_PREF, NULL))
|
||||||
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
rarch_ctl(RARCH_CTL_UNSET_IPS_PREF, NULL);
|
||||||
|
|
||||||
dir_clear(RARCH_DIR_RECORD_OUTPUT);
|
*global->record.output_dir = '\0';
|
||||||
dir_clear(RARCH_DIR_RECORD_CONFIG);
|
*global->record.config_dir = '\0';
|
||||||
|
|
||||||
*settings->path.core_options = '\0';
|
*settings->path.core_options = '\0';
|
||||||
*settings->path.content_history = '\0';
|
*settings->path.content_history = '\0';
|
||||||
|
34
dirs.c
34
dirs.c
@ -40,8 +40,6 @@ struct rarch_dir_list
|
|||||||
|
|
||||||
static struct rarch_dir_list dir_shader_list;
|
static struct rarch_dir_list dir_shader_list;
|
||||||
|
|
||||||
static char dir_record_output[PATH_MAX_LENGTH] = {0};
|
|
||||||
static char dir_record_config[PATH_MAX_LENGTH] = {0};
|
|
||||||
static char dir_osk_overlay[PATH_MAX_LENGTH] = {0};
|
static char dir_osk_overlay[PATH_MAX_LENGTH] = {0};
|
||||||
static char dir_system[PATH_MAX_LENGTH] = {0};
|
static char dir_system[PATH_MAX_LENGTH] = {0};
|
||||||
static char dir_savefile[PATH_MAX_LENGTH] = {0};
|
static char dir_savefile[PATH_MAX_LENGTH] = {0};
|
||||||
@ -174,10 +172,6 @@ bool dir_is_empty(enum rarch_dir_type type)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
return string_is_empty(dir_record_output);
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
return string_is_empty(dir_record_config);
|
|
||||||
case RARCH_DIR_SYSTEM:
|
case RARCH_DIR_SYSTEM:
|
||||||
return string_is_empty(dir_system);
|
return string_is_empty(dir_system);
|
||||||
case RARCH_DIR_SAVEFILE:
|
case RARCH_DIR_SAVEFILE:
|
||||||
@ -196,14 +190,10 @@ bool dir_is_empty(enum rarch_dir_type type)
|
|||||||
|
|
||||||
/* get size functions */
|
/* get size functions */
|
||||||
|
|
||||||
size_t dir_get_ptr_size(enum rarch_dir_type type)
|
size_t dir_get_size(enum rarch_dir_type type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
return sizeof(dir_record_output);
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
return sizeof(dir_record_config);
|
|
||||||
case RARCH_DIR_SYSTEM:
|
case RARCH_DIR_SYSTEM:
|
||||||
return sizeof(dir_system);
|
return sizeof(dir_system);
|
||||||
case RARCH_DIR_SAVEFILE:
|
case RARCH_DIR_SAVEFILE:
|
||||||
@ -226,12 +216,6 @@ void dir_clear(enum rarch_dir_type type)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
*dir_record_output = '\0';
|
|
||||||
break;
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
*dir_record_config = '\0';
|
|
||||||
break;
|
|
||||||
case RARCH_DIR_SYSTEM:
|
case RARCH_DIR_SYSTEM:
|
||||||
*dir_system = '\0';
|
*dir_system = '\0';
|
||||||
break;
|
break;
|
||||||
@ -264,10 +248,6 @@ char *dir_get_ptr(enum rarch_dir_type type)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
return dir_record_output;
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
return dir_record_config;
|
|
||||||
case RARCH_DIR_SYSTEM:
|
case RARCH_DIR_SYSTEM:
|
||||||
return dir_system;
|
return dir_system;
|
||||||
case RARCH_DIR_SAVEFILE:
|
case RARCH_DIR_SAVEFILE:
|
||||||
@ -290,10 +270,6 @@ const char *dir_get(enum rarch_dir_type type)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
return dir_record_output;
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
return dir_record_config;
|
|
||||||
case RARCH_DIR_OSK_OVERLAY:
|
case RARCH_DIR_OSK_OVERLAY:
|
||||||
return dir_osk_overlay;
|
return dir_osk_overlay;
|
||||||
case RARCH_DIR_SYSTEM:
|
case RARCH_DIR_SYSTEM:
|
||||||
@ -316,14 +292,6 @@ void dir_set(enum rarch_dir_type type, const char *path)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RARCH_DIR_RECORD_OUTPUT:
|
|
||||||
strlcpy(dir_record_output, path,
|
|
||||||
sizeof(dir_record_output));
|
|
||||||
break;
|
|
||||||
case RARCH_DIR_RECORD_CONFIG:
|
|
||||||
strlcpy(dir_record_config, path,
|
|
||||||
sizeof(dir_record_config));
|
|
||||||
break;
|
|
||||||
case RARCH_DIR_OSK_OVERLAY:
|
case RARCH_DIR_OSK_OVERLAY:
|
||||||
strlcpy(dir_osk_overlay, path,
|
strlcpy(dir_osk_overlay, path,
|
||||||
sizeof(dir_osk_overlay));
|
sizeof(dir_osk_overlay));
|
||||||
|
6
dirs.h
6
dirs.h
@ -27,9 +27,7 @@ enum rarch_dir_type
|
|||||||
RARCH_DIR_SYSTEM,
|
RARCH_DIR_SYSTEM,
|
||||||
RARCH_DIR_SAVEFILE,
|
RARCH_DIR_SAVEFILE,
|
||||||
RARCH_DIR_SAVESTATE,
|
RARCH_DIR_SAVESTATE,
|
||||||
RARCH_DIR_OSK_OVERLAY,
|
RARCH_DIR_OSK_OVERLAY
|
||||||
RARCH_DIR_RECORD_OUTPUT,
|
|
||||||
RARCH_DIR_RECORD_CONFIG
|
|
||||||
};
|
};
|
||||||
|
|
||||||
bool dir_init_shader(void);
|
bool dir_init_shader(void);
|
||||||
@ -44,7 +42,7 @@ void dir_clear(enum rarch_dir_type type);
|
|||||||
|
|
||||||
void dir_clear_all(void);
|
void dir_clear_all(void);
|
||||||
|
|
||||||
size_t dir_get_ptr_size(enum rarch_dir_type type);
|
size_t dir_get_size(enum rarch_dir_type type);
|
||||||
|
|
||||||
char *dir_get_ptr(enum rarch_dir_type type);
|
char *dir_get_ptr(enum rarch_dir_type type);
|
||||||
|
|
||||||
|
@ -43,7 +43,6 @@
|
|||||||
#include "../../managers/cheat_manager.h"
|
#include "../../managers/cheat_manager.h"
|
||||||
#include "../../tasks/tasks_internal.h"
|
#include "../../tasks/tasks_internal.h"
|
||||||
#include "../../input/input_remapping.h"
|
#include "../../input/input_remapping.h"
|
||||||
#include "../../dirs.h"
|
|
||||||
#include "../../paths.h"
|
#include "../../paths.h"
|
||||||
#include "../../retroarch.h"
|
#include "../../retroarch.h"
|
||||||
#include "../../runloop.h"
|
#include "../../runloop.h"
|
||||||
@ -352,7 +351,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
|||||||
menu_displaylist_reset_filebrowser();
|
menu_displaylist_reset_filebrowser();
|
||||||
info.type = type;
|
info.type = type;
|
||||||
info.directory_ptr = idx;
|
info.directory_ptr = idx;
|
||||||
info_path = dir_get(RARCH_DIR_RECORD_CONFIG);
|
info_path = global->record.config_dir;
|
||||||
info_label = label;
|
info_label = label;
|
||||||
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
dl_type = DISPLAYLIST_FILE_BROWSER_SELECT_FILE;
|
||||||
}
|
}
|
||||||
|
@ -6467,8 +6467,8 @@ static bool setting_append_list(
|
|||||||
{
|
{
|
||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
dir_get_ptr(RARCH_DIR_RECORD_OUTPUT),
|
global->record.output_dir,
|
||||||
dir_get_ptr_size(RARCH_DIR_RECORD_OUTPUT),
|
sizeof(global->record.output_dir),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_RECORDING_OUTPUT_DIRECTORY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY),
|
||||||
"",
|
"",
|
||||||
@ -6482,8 +6482,8 @@ static bool setting_append_list(
|
|||||||
|
|
||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
dir_get_ptr(RARCH_DIR_RECORD_CONFIG),
|
global->record.config_dir,
|
||||||
dir_get_ptr_size(RARCH_DIR_RECORD_CONFIG),
|
sizeof(global->record.config_dir),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_RECORDING_CONFIG_DIRECTORY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY),
|
||||||
"",
|
"",
|
||||||
@ -6514,7 +6514,7 @@ static bool setting_append_list(
|
|||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
dir_get_ptr(RARCH_DIR_OSK_OVERLAY),
|
dir_get_ptr(RARCH_DIR_OSK_OVERLAY),
|
||||||
dir_get_ptr_size(RARCH_DIR_OSK_OVERLAY),
|
dir_get_size(RARCH_DIR_OSK_OVERLAY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_OSK_OVERLAY_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_OSK_OVERLAY_DIRECTORY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OSK_OVERLAY_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_OSK_OVERLAY_DIRECTORY),
|
||||||
g_defaults.dir.osk_overlay,
|
g_defaults.dir.osk_overlay,
|
||||||
@ -6590,7 +6590,7 @@ static bool setting_append_list(
|
|||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
dir_get_ptr(RARCH_DIR_SAVEFILE),
|
dir_get_ptr(RARCH_DIR_SAVEFILE),
|
||||||
dir_get_ptr_size(RARCH_DIR_SAVEFILE),
|
dir_get_size(RARCH_DIR_SAVEFILE),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVEFILE_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_SAVEFILE_DIRECTORY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY),
|
||||||
"",
|
"",
|
||||||
@ -6605,7 +6605,7 @@ static bool setting_append_list(
|
|||||||
CONFIG_DIR(
|
CONFIG_DIR(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
dir_get_ptr(RARCH_DIR_SAVESTATE),
|
dir_get_ptr(RARCH_DIR_SAVESTATE),
|
||||||
dir_get_ptr_size(RARCH_DIR_SAVESTATE),
|
dir_get_size(RARCH_DIR_SAVESTATE),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_SAVESTATE_DIRECTORY),
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY),
|
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY),
|
||||||
"",
|
"",
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "../runloop.h"
|
#include "../runloop.h"
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
#include "../msg_hash.h"
|
#include "../msg_hash.h"
|
||||||
#include "../dirs.h"
|
|
||||||
#include "../paths.h"
|
#include "../paths.h"
|
||||||
#include "../list_special.h"
|
#include "../list_special.h"
|
||||||
|
|
||||||
@ -337,7 +336,7 @@ bool recording_init(void)
|
|||||||
|
|
||||||
if (recording_use_output_dir)
|
if (recording_use_output_dir)
|
||||||
fill_pathname_join(recording_file,
|
fill_pathname_join(recording_file,
|
||||||
dir_get(RARCH_DIR_RECORD_OUTPUT),
|
global->record.output_dir,
|
||||||
path_get(RARCH_PATH_RECORD),
|
path_get(RARCH_PATH_RECORD),
|
||||||
sizeof(recording_file));
|
sizeof(recording_file));
|
||||||
|
|
||||||
|
15
runloop.c
15
runloop.c
@ -728,6 +728,7 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
|||||||
break;
|
break;
|
||||||
case RUNLOOP_CTL_GLOBAL_FREE:
|
case RUNLOOP_CTL_GLOBAL_FREE:
|
||||||
{
|
{
|
||||||
|
global_t *global = NULL;
|
||||||
command_event(CMD_EVENT_TEMPORARY_CONTENT_DEINIT, NULL);
|
command_event(CMD_EVENT_TEMPORARY_CONTENT_DEINIT, NULL);
|
||||||
|
|
||||||
path_deinit_subsystem();
|
path_deinit_subsystem();
|
||||||
@ -757,22 +758,10 @@ bool runloop_ctl(enum runloop_ctl_state state, void *data)
|
|||||||
|
|
||||||
core_unset_input_descriptors();
|
core_unset_input_descriptors();
|
||||||
|
|
||||||
|
global = global_get_ptr();
|
||||||
path_clear_all();
|
path_clear_all();
|
||||||
dir_clear(RARCH_DIR_RECORD_CONFIG);
|
|
||||||
dir_clear(RARCH_DIR_RECORD_OUTPUT);
|
|
||||||
dir_clear_all();
|
dir_clear_all();
|
||||||
recording_driver_free_state();
|
|
||||||
{
|
|
||||||
unsigned j;
|
|
||||||
for (j = 0; j < MAX_USERS; j++)
|
|
||||||
retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_LIBRETRO_DEVICE, &j);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
global_t *global = global_get_ptr();
|
|
||||||
memset(global, 0, sizeof(struct global));
|
memset(global, 0, sizeof(struct global));
|
||||||
}
|
|
||||||
|
|
||||||
retroarch_override_setting_free_state();
|
retroarch_override_setting_free_state();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
14
runloop.h
14
runloop.h
@ -150,6 +150,20 @@ typedef struct global
|
|||||||
} netplay;
|
} netplay;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Recording. */
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
char output_dir[PATH_MAX_LENGTH];
|
||||||
|
char config_dir[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
unsigned width;
|
||||||
|
unsigned height;
|
||||||
|
|
||||||
|
size_t gpu_width;
|
||||||
|
size_t gpu_height;
|
||||||
|
bool use_output_dir;
|
||||||
|
} record;
|
||||||
|
|
||||||
/* Settings and/or global state that is specific to
|
/* Settings and/or global state that is specific to
|
||||||
* a console-style implementation. */
|
* a console-style implementation. */
|
||||||
struct
|
struct
|
||||||
|
Loading…
x
Reference in New Issue
Block a user