From b4c7d5f91c8091d92fb304ce3c7c158dd766face Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Thu, 17 Jun 2021 12:34:18 +0200 Subject: [PATCH] util/library: Convert paths to native format --- source/util/util-library.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/util/util-library.cpp b/source/util/util-library.cpp index 492fb78..6c32302 100644 --- a/source/util/util-library.cpp +++ b/source/util/util-library.cpp @@ -20,6 +20,7 @@ #include "util-library.hpp" #include +#include "util-platform.hpp" #if defined(_WIN32) || defined(_WIN64) || defined(__CYGWIN__) // Windows #define ST_WINDOWS @@ -37,6 +38,7 @@ streamfx::util::library::library(std::filesystem::path file) : _library(nullptr) { #if defined(ST_WINDOWS) SetLastError(ERROR_SUCCESS); + file = ::streamfx::util::platform::utf8_to_native(file); _library = reinterpret_cast(LoadLibraryW(file.wstring().c_str())); if (!_library) { DWORD error = GetLastError();