mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
Creat APPLICATION_SPECIAL_DIRECTORY_CONFIG
This commit is contained in:
parent
7c904d47c2
commit
6f8b6a22b7
@ -44,6 +44,7 @@
|
||||
#include "configuration.h"
|
||||
#include "file_path_special.h"
|
||||
|
||||
#include "runloop.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
void fill_pathname_expand_special(char *out_path,
|
||||
@ -279,6 +280,18 @@ void fill_pathname_application_special(char *s, size_t len, enum application_spe
|
||||
len);
|
||||
}
|
||||
break;
|
||||
case APPLICATION_SPECIAL_DIRECTORY_CONFIG:
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
/* Try config directory setting first,
|
||||
* fallback to the location of the current configuration file. */
|
||||
if (!string_is_empty(settings->directory.menu_config))
|
||||
strlcpy(s, settings->directory.menu_config, len);
|
||||
else if (!string_is_empty(global->path.config))
|
||||
fill_pathname_basedir(s, global->path.config, len);
|
||||
}
|
||||
break;
|
||||
case APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS:
|
||||
#ifdef HAVE_ZARCH
|
||||
{
|
||||
|
@ -26,6 +26,7 @@ enum application_special_type
|
||||
{
|
||||
APPLICATION_SPECIAL_NONE = 0,
|
||||
APPLICATION_SPECIAL_DIRECTORY_AUTOCONFIG,
|
||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_FONT,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_MATERIALUI_ICONS,
|
||||
|
14
retroarch.c
14
retroarch.c
@ -51,6 +51,7 @@
|
||||
#include "dynamic.h"
|
||||
#include "msg_hash.h"
|
||||
#include "movie.h"
|
||||
#include "file_path_special.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "frontend/frontend_driver.h"
|
||||
@ -1195,17 +1196,8 @@ bool retroarch_validate_game_options(char *s, size_t len, bool mkdir)
|
||||
if (string_is_empty(core_name) || string_is_empty(game_name))
|
||||
return false;
|
||||
|
||||
/* Config directory: config_directory.
|
||||
* Try config directory setting first,
|
||||
* fallback to the location of the current configuration file. */
|
||||
if (!string_is_empty(settings->directory.menu_config))
|
||||
strlcpy(config_directory,
|
||||
settings->directory.menu_config, sizeof(config_directory));
|
||||
else if (!string_is_empty(global->path.config))
|
||||
fill_pathname_basedir(config_directory,
|
||||
global->path.config, sizeof(config_directory));
|
||||
else
|
||||
return false;
|
||||
fill_pathname_application_special(config_directory, sizeof(config_directory),
|
||||
APPLICATION_SPECIAL_DIRECTORY_CONFIG);
|
||||
|
||||
/* Concatenate strings into full paths for game_path */
|
||||
fill_pathname_join(s,
|
||||
|
Loading…
x
Reference in New Issue
Block a user