Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
prism/platforms/sdl/file.cpp

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");
}