From 48b3e5a9a2861e50f92ab206ee6cb86dd3e16b24 Mon Sep 17 00:00:00 2001 From: zilmar Date: Thu, 21 Nov 2024 10:48:16 +1030 Subject: [PATCH] Core: Zip load in CN64System::LoadState uses utf16 path --- Source/Project64-core/N64System/N64System.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/Project64-core/N64System/N64System.cpp b/Source/Project64-core/N64System/N64System.cpp index 0c07f0e8a..a880ceee2 100644 --- a/Source/Project64-core/N64System/N64System.cpp +++ b/Source/Project64-core/N64System/N64System.cpp @@ -1871,7 +1871,9 @@ bool CN64System::LoadState(const char * FileName) { SaveFile.SetNameExtension(stdstr_f("%s.zip", SaveFile.GetNameExtension().c_str()).c_str()); } - unzFile file = unzOpen(SaveFile); + zlib_filefunc64_def ffunc; + fill_win32_filefunc64W(&ffunc); + unzFile file = unzOpen2_64(stdstr((std::string &)SaveFile).ToUTF16().c_str(), &ffunc); int port = -1; if (file != nullptr) {