1
0
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:
Zeno Rogue
2026-04-17 15:38:51 +02:00
parent d23732cd71
commit d69c162253

View File

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