mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-20 19:40:39 +00:00
Start using dir_system functions
This commit is contained in:
parent
63270de821
commit
4a4c613ee1
5
dirs.c
5
dirs.c
@ -81,6 +81,11 @@ char *dir_get_savefile_ptr(void)
|
||||
return dir_savefile;
|
||||
}
|
||||
|
||||
char *dir_get_system_ptr(void)
|
||||
{
|
||||
return dir_system;
|
||||
}
|
||||
|
||||
const char *dir_get_system(void)
|
||||
{
|
||||
return dir_system;
|
||||
|
2
dirs.h
2
dirs.h
@ -41,6 +41,8 @@ char *dir_get_savestate_ptr(void);
|
||||
|
||||
const char *dir_get_savestate(void);
|
||||
|
||||
char *dir_get_system_ptr(void);
|
||||
|
||||
const char *dir_get_system(void);
|
||||
|
||||
void dir_set_savefile(const char *path);
|
||||
|
11
dynamic.c
11
dynamic.c
@ -51,6 +51,7 @@
|
||||
#include "cores/internal_cores.h"
|
||||
#include "frontend/frontend_driver.h"
|
||||
#include "content.h"
|
||||
#include "dirs.h"
|
||||
#include "paths.h"
|
||||
#include "retroarch.h"
|
||||
#include "runloop.h"
|
||||
@ -1030,15 +1031,17 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
if (runloop_ctl(RUNLOOP_CTL_GET_CONTENT_PATH, &fullpath) &&
|
||||
fullpath)
|
||||
{
|
||||
char temp_path[PATH_MAX_LENGTH] = {0};
|
||||
|
||||
RARCH_WARN("SYSTEM DIR is empty, assume CONTENT DIR %s\n",
|
||||
fullpath);
|
||||
fill_pathname_basedir(global->dir.systemdir, fullpath,
|
||||
sizeof(global->dir.systemdir));
|
||||
fill_pathname_basedir(temp_path, fullpath, sizeof(temp_path));
|
||||
dir_set_system(temp_path);
|
||||
}
|
||||
|
||||
*(const char**)data = global->dir.systemdir;
|
||||
*(const char**)data = dir_get_system_ptr();
|
||||
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n",
|
||||
global->dir.systemdir);
|
||||
dir_get_system());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user