mirror of https://github.com/bsnes-emu/bsnes.git
nall: Use the value of datadir to find the assets dir.
This commit is contained in:
parent
8a6b89d032
commit
adafcb4430
|
@ -12,6 +12,9 @@ auto locate(string name) -> string {
|
|||
location = {Path::userData(), "bsnes/", name};
|
||||
if(inode::exists(location)) return location;
|
||||
|
||||
location = {Path::sharedData(), "bsnes/", name};
|
||||
if(inode::exists(location)) return location;
|
||||
|
||||
directory::create({Path::userSettings(), "bsnes/"});
|
||||
return {Path::userSettings(), "bsnes/", name};
|
||||
}
|
||||
|
|
|
@ -243,4 +243,5 @@ else
|
|||
bindir ?= $(prefix)/bin
|
||||
datarootdir ?= $(prefix)/share
|
||||
datadir ?= $(datarootdir)
|
||||
flags += -DDATADIR=\"$(datadir)\"
|
||||
endif
|
||||
|
|
|
@ -137,6 +137,8 @@ inline auto sharedData() -> string {
|
|||
result.transform("\\", "/");
|
||||
#elif defined(PLATFORM_MACOS)
|
||||
string result = "/Library/Application Support/";
|
||||
#elif defined(DATADIR)
|
||||
string result = DATADIR;
|
||||
#else
|
||||
string result = "/usr/share/";
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue