From 374d8f7b638232cf47b4c5d1843d76736ef67602 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Mon, 7 Feb 2022 09:58:13 -0500 Subject: [PATCH] Use SDL_GetBasePath() on macOS --- platforms/sdl/file.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platforms/sdl/file.cpp b/platforms/sdl/file.cpp index e9cc5b3..ec1153d 100644 --- a/platforms/sdl/file.cpp +++ b/platforms/sdl/file.cpp @@ -6,7 +6,9 @@ void prism::set_domain_path(const prism::domain domain, const prism::path& path) { #ifdef PLATFORM_MACOS - domain_data[(int)domain] = replace_substring(path.string(), "{resource_dir}/", "../Resources/"); + char* base_path = SDL_GetBasePath(); + + domain_data[(int)domain] = replace_substring(path.string(), "{resource_dir}/", base_path); #else domain_data[(int)domain] = replace_substring(path.string(), "{resource_dir}/", ""); #endif