mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-12 13:08:50 +01:00
[dxvk] Always reference library in VR extension providers
This commit is contained in:
parent
2c014fdb34
commit
af9bd16b8d
@ -305,11 +305,14 @@ namespace dxvk {
|
||||
|
||||
|
||||
HMODULE VrInstance::loadLibrary() {
|
||||
HMODULE handle = nullptr;
|
||||
if (!(handle = ::GetModuleHandle("openvr_api.dll"))) {
|
||||
HMODULE handle;
|
||||
|
||||
// Use openvr_api.dll only if already loaded in the process (and reference it which GetModuleHandleEx does without
|
||||
// GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT flag).
|
||||
if (!::GetModuleHandleEx(0, "openvr_api.dll", &handle))
|
||||
handle = ::LoadLibrary("openvr_api_dxvk.dll");
|
||||
m_loadedOvrApi = handle != nullptr;
|
||||
}
|
||||
|
||||
m_loadedOvrApi = handle != nullptr;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
@ -147,11 +147,9 @@ namespace dxvk {
|
||||
|
||||
|
||||
HMODULE DxvkXrProvider::loadLibrary() {
|
||||
HMODULE handle = nullptr;
|
||||
if (!(handle = ::GetModuleHandle("wineopenxr.dll"))) {
|
||||
handle = ::LoadLibrary("wineopenxr.dll");
|
||||
m_loadedOxrApi = handle != nullptr;
|
||||
}
|
||||
HMODULE handle = ::LoadLibrary("wineopenxr.dll");
|
||||
|
||||
m_loadedOxrApi = handle != nullptr;
|
||||
return handle;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user