From 1fdcc43644a7d2af504cc5d1ea74359571ee798b Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Mon, 3 Jun 2024 21:11:09 +0200 Subject: [PATCH] (Windows) Fixed an issue where filenames containing multi-byte Unicode characters could not be used with the %INJECT% variable --- es-app/src/FileData.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/es-app/src/FileData.cpp b/es-app/src/FileData.cpp index b818d19f7..1f143c8ac 100644 --- a/es-app/src/FileData.cpp +++ b/es-app/src/FileData.cpp @@ -1605,7 +1605,11 @@ void FileData::launchGame() << "\""; std::string arguments; std::ifstream injectFileStream; +#if defined(_WIN64) + injectFileStream.open(Utils::String::stringToWideString(injectFile)); +#else injectFileStream.open(injectFile); +#endif for (std::string line; getline(injectFileStream, line);) { // Remove Windows carriage return characters. line = Utils::String::replace(line, "\r", "");