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

18 lines
473 B
C++
Raw Normal View History

2021-03-01 14:40:02 -05:00
#include "file.hpp"
#include "string_utils.hpp"
#include <SDL.h>
2021-10-14 08:51:58 -04:00
void prism::set_domain_path(const prism::domain domain, const prism::path& path) {
2021-09-13 17:19:59 -04:00
#ifdef PLATFORM_MACOS
domain_data[(int)domain] = replace_substring(path.string(), "{resource_dir}/", "../Resources/");
#else
2021-03-01 14:40:02 -05:00
domain_data[(int)domain] = replace_substring(path.string(), "{resource_dir}/", "");
2021-09-13 17:19:59 -04:00
#endif
2021-03-01 14:40:02 -05:00
}
2021-05-12 09:05:56 -04:00
prism::path prism::get_writeable_directory() {
return SDL_GetPrefPath("Prism", "Prism");
2021-03-01 14:40:02 -05:00
}