@@ -644,7 +644,7 @@ HRESULT __stdcall DXHook_CreateDevice(
644
644
gVR = std::make_unique<OpenVR>(dev, gCfg , &gD3DVR , winBounds.right , winBounds.bottom );
645
645
}
646
646
} catch (const std::runtime_error& e) {
647
- MessageBoxA (hFocusWindow, std::format ( " VR init failed: {} " , e.what ()). c_str (), " VR init failed" , MB_OK);
647
+ MessageBoxA (hFocusWindow, e.what (), " VR init failed" , MB_OK);
648
648
}
649
649
// Initialize this pointer here, as it's too early to do this in openRBRVR constructor
650
650
auto rxHandle = GetModuleHandle (" Plugins\\ rbr_rx.dll" );
@@ -669,7 +669,11 @@ IDirect3D9* __stdcall DXHook_Direct3DCreate9(UINT SDKVersion)
669
669
if (gCfg .runtime == OPENXR) {
670
670
// OpenXR must be initialized before calling Direct3DCreate9
671
671
// because it will query extensions when initializing DXVK
672
- gVR = std::make_unique<OpenXR>();
672
+ try {
673
+ gVR = std::make_unique<OpenXR>();
674
+ } catch (const std::runtime_error& e) {
675
+ MessageBoxA (nullptr , e.what (), " OpenXR init failed" , MB_OK);
676
+ }
673
677
}
674
678
675
679
auto d3d = hooks::create.call (SDKVersion);
@@ -682,6 +686,7 @@ IDirect3D9* __stdcall DXHook_Direct3DCreate9(UINT SDKVersion)
682
686
hooks::createdevice = Hook (d3dvtbl->CreateDevice , DXHook_CreateDevice);
683
687
} catch (const std::runtime_error& e) {
684
688
Dbg (e.what ());
689
+ MessageBoxA (nullptr , e.what (), " Hooking failed" , MB_OK);
685
690
}
686
691
return d3d;
687
692
}
@@ -709,6 +714,7 @@ openRBRVR::openRBRVR(IRBRGame* g)
709
714
hooks::renderparticles = Hook (*reinterpret_cast <decltype (RBRHook_RenderParticles)*>(RBRRenderParticlesFunctionAddr), RBRHook_RenderParticles);
710
715
} catch (const std::runtime_error& e) {
711
716
Dbg (e.what ());
717
+ MessageBoxA (nullptr , e.what (), " Hooking failed" , MB_OK);
712
718
}
713
719
gCfg = gSavedCfg = Config::fromFile (" Plugins\\ openRBRVR.ini" );
714
720
}
0 commit comments