From d69c162253f4a8e058a74333c0eb4555b41feac1 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 17 Apr 2026 15:38:51 +0200 Subject: [PATCH] added SDL_GetBasePath as one of the options in find_file --- util.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util.cpp b/util.cpp index 862e1a5c..59158c8c 100644 --- a/util.cpp +++ b/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; }