save code

This commit is contained in:
xsl
2025-10-26 00:13:08 +08:00
parent 41a659bd6d
commit b2da84f903
66 changed files with 24834 additions and 78 deletions
+5 -1
View File
@@ -22,11 +22,15 @@ void VK_CHECK(VkResult ret)
// return path;
//}
std::vector<unsigned char> AppBase::readFileEx(const std::string& path)
std::vector<unsigned char> AppBase::readFileUnsignedChar(const std::string& path, bool example)
{
std::vector<unsigned char> buffer;
#ifdef _WIN32
std::string enginePath = "app/src/main/assets/" + path;
if (example)
{
enginePath = "example/src/main/assets/" + path;
}
std::ifstream file{ enginePath, std::ios::ate | std::ios::binary };
if (!file.is_open())