Fix issues

This commit is contained in:
2023-11-22 16:25:44 +01:00
parent ffb7143c2d
commit 5393f2101a
3 changed files with 3 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ namespace OpenVulkano
std::ifstream file(filePath, std::ios::ate | std::ios::binary);
if (!file.is_open())
{
if (emptyOnMissing) return { 0 };
if (emptyOnMissing) return {};
throw std::runtime_error("Failed to open file '" + filePath + "'!");
}
const size_t fileSize = static_cast<size_t>(file.tellg());

View File

@@ -42,6 +42,6 @@ namespace OpenVulkano
Array<char> ResourceLoaderAppDirLinux::GetResource(const std::string& resourceName)
{
return Utils::ReadFile(GetAppDir() + resourceName);
return Utils::ReadFile(GetAppDir() + resourceName, true);
}
}

View File

@@ -33,7 +33,7 @@ namespace OpenVulkano
Logger::FILESYS->error("Unknown error trying to get resource for '{}'!", resourceName);
}
}
return { 0 };
return {};
}
void* Register(std::unique_ptr<ResourceLoader> loader)