mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-10-25 10:24:26 +00:00
added SDL_GetBasePath as one of the options in find_file
This commit is contained in:
1 parent
d23732cd71
commit
d69c162253
1 file changed
+7
@@ -1050,6 +1050,13 @@ EX string find_file(string s) {
|
||||
#endif
|
||||
#ifdef FHS
|
||||
if(file_exists(s1 = "/usr/share/hyperrogue/" + s)) return s1;
|
||||
#endif
|
||||
#if SDLVER >= 2
|
||||
char *path = SDL_GetBasePath();
|
||||
if(path) {
|
||||
string bpath = path;
|
||||
if(file_exists(s1 = bpath + s)) return s1;
|
||||
}
|
||||
#endif
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user