Archived
1
Fork 0

Use SDL_GetBasePath() on macOS

This commit is contained in:
Joshua Goins 2022-02-07 09:58:13 -05:00
parent 48348ac09f
commit 374d8f7b63

View file

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