18 #include "sdl3_resource_manager.hpp"
20 #if __has_include(<filesystem>)
22 namespace fs = std::filesystem;
23 #elif __has_include(<experimental/filesystem>)
24 #include <experimental/filesystem>
25 namespace fs = std::experimental::filesystem;
27 #error Could not find system header "<filesystem>" or "<experimental/filesystem>"
32 if (useCompiledResources())
34 auto d = data(type,
id);
38 return SDL_IOFromConstMem(d->data(), d->size());
41 auto name = filename(type,
id);
42 return SDL_IOFromFile(name.c_str(),
"rb");
static SDL_IOStream * get(const std::string &type, const std::string &id)