69 {
70 const std::filesystem::path requested_root = std::filesystem::path(asset_root) / "data";
71 if (std::filesystem::exists(requested_root / "crt.frag.spv")) {
72 return requested_root.lexically_normal().string();
73 }
74
75 if (const char *base_path = SDL_GetBasePath(); base_path != nullptr && base_path[0] != '\0') {
76 const std::filesystem::path runtime_root = std::filesystem::path(base_path) / "data";
77 if (std::filesystem::exists(runtime_root / "crt.frag.spv")) {
78 return runtime_root.lexically_normal().string();
79 }
80 }
81
82 return requested_root.lexically_normal().string();
83 }