refactor code and support utf8 strings rendering

This commit is contained in:
ohyzha
2024-08-02 23:08:24 +03:00
parent 875ad80337
commit 9589b4d39f
11 changed files with 70 additions and 30 deletions

View File

@@ -90,12 +90,11 @@ namespace OpenVulkano
return Array<char>(buffer);
}
Array<char> WebResourceLoader::GetResource(const std::string& resourceName, std::string& resourcePath)
Array<char> WebResourceLoader::GetResource(const std::string& resourceName)
{
if (IsUrl(resourceName))
{
std::filesystem::path cacheFilePath = GetCacheFilePath(resourceName);
resourcePath = resourceName;
if (std::filesystem::exists(cacheFilePath)) { return Utils::ReadFile(cacheFilePath.string()); }
else { return DownloadResource(resourceName); }
}