mirror of
https://github.com/Dingo-Shenanigans/ReSkate.git
synced 2026-10-23 14:15:53 +02:00
Write paths as UTF-8 in the remaining messages
Each built its text with path::string(), which throws for a character outside the ANSI code page, so the real error or message was replaced by a code-page error.
This commit is contained in:
1 parent
619331aa0b
commit
2d3430cbd4
6 files changed
+17
-11
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "cas_codec.h"
|
||||
#include "Engine/Core/Platform/path_text.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <Windows.h>
|
||||
@@ -68,7 +69,7 @@ HMODULE oodle(const std::filesystem::path& gameRoot) {
|
||||
std::ranges::sort(matches);
|
||||
handle = LoadLibraryExW(matches.back().c_str(), nullptr,
|
||||
LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR | LOAD_LIBRARY_SEARCH_SYSTEM32);
|
||||
if (!handle) throw std::runtime_error("Cannot load " + matches.back().string() +
|
||||
if (!handle) throw std::runtime_error("Cannot load " + path_utf8(matches.back()) +
|
||||
" (Windows error " + std::to_string(GetLastError()) + ")");
|
||||
return handle;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user