From 6bfd396721eab7e5d9a8e15bc27fa2d0b160f713 Mon Sep 17 00:00:00 2001 From: ThePixelMoon Date: Thu, 5 Mar 2026 07:40:23 +0200 Subject: [PATCH] Minecraft.Client: fix some unicode-related linux errors --- Minecraft.Client/ArchiveFile.cpp | 2 +- Minecraft.Client/Common/UI/UITTFFont.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/ArchiveFile.cpp b/Minecraft.Client/ArchiveFile.cpp index cdb881e03..75f0b4eed 100644 --- a/Minecraft.Client/ArchiveFile.cpp +++ b/Minecraft.Client/ArchiveFile.cpp @@ -121,7 +121,7 @@ byteArray ArchiveFile::getFile(const wstring &filename) memcpy( out.data, m_cachedData + data->ptr, data->filesize ); #else -#ifdef _UNICODE +#if defined(_UNICODE) && !defined(__linux__) HANDLE hfile = CreateFile( m_sourcefile.getPath().c_str(), GENERIC_READ, 0, diff --git a/Minecraft.Client/Common/UI/UITTFFont.cpp b/Minecraft.Client/Common/UI/UITTFFont.cpp index 42ae041cd..d652cb36a 100644 --- a/Minecraft.Client/Common/UI/UITTFFont.cpp +++ b/Minecraft.Client/Common/UI/UITTFFont.cpp @@ -8,7 +8,7 @@ UITTFFont::UITTFFont(const string &path, S32 fallbackCharacter) { app.DebugPrintf("UITTFFont opening %s\n",path.c_str()); -#ifdef _UNICODE +#if defined(_UNICODE) && !defined(__linux__) wstring wPath = convStringToWstring(path); HANDLE file = CreateFile(wPath.c_str(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); #else