19 lines
513 B
C++
19 lines
513 B
C++
#include "file.hpp"
|
|
|
|
#include "string_utils.hpp"
|
|
|
|
#include <SDL.h>
|
|
|
|
void prism::set_domain_path(const prism::domain domain, const prism::path& path) {
|
|
#ifdef PLATFORM_MACOS
|
|
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
|
|
}
|
|
|
|
prism::path prism::get_writeable_directory() {
|
|
return SDL_GetPrefPath("Prism", "Prism");
|
|
}
|