mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-05-08 00:01:24 +00:00
added SDL_GetBasePath as one of the options in find_file
This commit is contained in:
7
util.cpp
7
util.cpp
@@ -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