Need to fix: - Remove default android header bar - Fix rcss styling to work on small screens
16 lines
433 B
C++
16 lines
433 B
C++
#pragma once
|
|
|
|
#include <SDL3/SDL.h>
|
|
#include <string>
|
|
|
|
inline SDL_IOStream *OpenAssetFile(const std::string &virtual_path) {
|
|
std::string resolved = virtual_path;
|
|
#if defined(__ANDROID__)
|
|
if (resolved.rfind("./assets/", 0) == 0) {
|
|
resolved = resolved.substr(9);
|
|
} else if (resolved.rfind("assets/", 0) == 0) {
|
|
resolved = resolved.substr(7);
|
|
}
|
|
#endif
|
|
return SDL_IOFromFile(resolved.c_str(), "rb");
|
|
} |