FreeRDP
Loading...
Searching...
No Matches
sdl3_resource_manager.cpp
1
18#include "sdl3_resource_manager.hpp"
19#include <iostream>
20#include <filesystem.hpp>
21
22SDL_IOStream* SDL3ResourceManager::get(const std::string& type, const std::string& id)
23{
24 if (useCompiledResources())
25 {
26 auto d = data(type, id);
27 if (!d)
28 return nullptr;
29
30 return SDL_IOFromConstMem(d->data(), d->size());
31 }
32
33 auto name = filename(type, id);
34 return SDL_IOFromFile(name.c_str(), "rb");
35}
static SDL_IOStream * get(const std::string &type, const std::string &id)