android 平台跑通中文路径

This commit is contained in:
xsl
2025-10-28 22:24:24 +08:00
parent 1dfc63543f
commit 13357ab256
20 changed files with 149 additions and 39 deletions
+7 -3
View File
@@ -639,10 +639,10 @@ Texture Application::loadTexture(std::string path, Texture& tex, bool srgb)
processWithVulkan(image.data(), w, h, w * 4, image.size(), tex, srgb);
return tex;
}
Texture Application::loadTextureExample(std::string path, Texture& tex, bool srgb)
#ifdef _WIN32
Texture Application::loadTextureExample(std::wstring path, Texture& tex, bool srgb)
{
std::vector<unsigned char> data = readFileUnsignedChar(path, true);
std::vector<unsigned char> data = readFileUnsignedCharWin32(path, true);
std::vector<unsigned char> image;
unsigned w, h;
unsigned error = lodepng::decode(image, w, h, data, LCT_RGBA, 8);
@@ -650,6 +650,10 @@ Texture Application::loadTextureExample(std::string path, Texture& tex, bool srg
return tex;
}
#endif // _WIN32
void Application::createTexture(VkDevice device, VkPhysicalDevice physicalDevice, int width, int height, Texture& texture, bool srgb)
{