Add shared data to search paths

This commit is contained in:
Ghislain Antony Vaillant 2020-11-10 08:48:28 +01:00 committed by GitHub
parent 868fff9c06
commit 50e2373e71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -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};
}