mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +00:00
util/library: Convert paths to native format
This commit is contained in:
parent
57f15b64f7
commit
b4c7d5f91c
1 changed files with 2 additions and 0 deletions
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include "util-library.hpp"
|
||||
#include <unordered_map>
|
||||
#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<void*>(LoadLibraryW(file.wstring().c_str()));
|
||||
if (!_library) {
|
||||
DWORD error = GetLastError();
|
||||
|
|
Loading…
Reference in a new issue