refactor code and support utf8 strings rendering
This commit is contained in:
@@ -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); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user