mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
Create static variable for path_libretro and move it outside
of settings struct
This commit is contained in:
parent
7d7a62b92a
commit
0536439129
@ -3269,44 +3269,36 @@ bool config_replace(char *path)
|
||||
return true;
|
||||
}
|
||||
|
||||
static char path_libretro[PATH_MAX_LENGTH];
|
||||
|
||||
char *config_get_active_core_path_ptr(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return settings->path.libretro;
|
||||
return path_libretro;
|
||||
}
|
||||
|
||||
const char *config_get_active_core_path(void)
|
||||
{
|
||||
const char *core_path = (const char *)config_get_active_core_path_ptr();
|
||||
return core_path;
|
||||
return path_libretro;
|
||||
}
|
||||
|
||||
bool config_active_core_path_is_empty(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return !settings->path.libretro[0];
|
||||
return !path_libretro[0];
|
||||
}
|
||||
|
||||
size_t config_get_active_core_path_size(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
return sizeof(settings->path.libretro);
|
||||
return sizeof(path_libretro);
|
||||
}
|
||||
|
||||
void config_set_active_core_path(const char *path)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings)
|
||||
return;
|
||||
strlcpy(settings->path.libretro, path, sizeof(settings->path.libretro));
|
||||
strlcpy(path_libretro, path, sizeof(path_libretro));
|
||||
}
|
||||
|
||||
void config_clear_active_core_path(void)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings)
|
||||
return;
|
||||
*settings->path.libretro = '\0';
|
||||
*path_libretro = '\0';
|
||||
}
|
||||
|
||||
const char *config_get_active_path(void)
|
||||
|
@ -385,7 +385,6 @@ typedef struct settings
|
||||
{
|
||||
char cheat_database[PATH_MAX_LENGTH];
|
||||
char content_database[PATH_MAX_LENGTH];
|
||||
char libretro[PATH_MAX_LENGTH];
|
||||
char osk_overlay[PATH_MAX_LENGTH];
|
||||
char overlay[PATH_MAX_LENGTH];
|
||||
char menu_wallpaper[PATH_MAX_LENGTH];
|
||||
|
Loading…
x
Reference in New Issue
Block a user