From 53504ca23fcdbb5c29d65d6c6957cfe2658eaf48 Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Sun, 12 Apr 2026 17:48:17 -0700 Subject: [PATCH 1/2] fix(VR): allow for Engine Fixes VR 7.x (NG) --- src/XSEPlugin.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/XSEPlugin.cpp b/src/XSEPlugin.cpp index f3b807ddb7..79bf32c292 100644 --- a/src/XSEPlugin.cpp +++ b/src/XSEPlugin.cpp @@ -194,8 +194,22 @@ bool Load() } } + // Engine Fixes: VR accepts either EngineFixesVR.dll or the EngineFixes.dll NG + if (REL::Module::IsVR()) { + if (!LoadLibrary(L"Data/SKSE/Plugins/EngineFixesVR.dll") && !LoadLibrary(L"Data/SKSE/Plugins/EngineFixes.dll")) { + auto errorMessage = std::string("Required DLL EngineFixesVR.dll or EngineFixes.dll was missing"); + logger::error("{}", errorMessage); + errors.push_back(errorMessage); + } + } else { + if (!LoadLibrary(L"Data/SKSE/Plugins/EngineFixes.dll")) { + auto errorMessage = std::format("Required DLL {} was missing", stl::utf16_to_utf8(L"Data/SKSE/Plugins/EngineFixes.dll").value_or(""s)); + logger::error("{}", errorMessage); + errors.push_back(errorMessage); + } + } + const std::array requiredDLLs = { - REL::Module::IsVR() ? L"Data/SKSE/Plugins/EngineFixesVR.dll" : L"Data/SKSE/Plugins/EngineFixes.dll", L"Data/SKSE/Plugins/CrashLogger.dll" }; From a935213f67194d11574e02ec37518619c1e2b27f Mon Sep 17 00:00:00 2001 From: Alan Tse Date: Sun, 12 Apr 2026 21:11:50 -0700 Subject: [PATCH 2/2] chore: address ai comments --- src/XSEPlugin.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/XSEPlugin.cpp b/src/XSEPlugin.cpp index 79bf32c292..5a9d01c285 100644 --- a/src/XSEPlugin.cpp +++ b/src/XSEPlugin.cpp @@ -194,18 +194,20 @@ bool Load() } } + auto pushMissingDllError = [&](std::string_view dllName) { + auto errorMessage = std::format("Required DLL {} was missing", dllName); + logger::error("{}", errorMessage); + errors.push_back(errorMessage); + }; + // Engine Fixes: VR accepts either EngineFixesVR.dll or the EngineFixes.dll NG if (REL::Module::IsVR()) { if (!LoadLibrary(L"Data/SKSE/Plugins/EngineFixesVR.dll") && !LoadLibrary(L"Data/SKSE/Plugins/EngineFixes.dll")) { - auto errorMessage = std::string("Required DLL EngineFixesVR.dll or EngineFixes.dll was missing"); - logger::error("{}", errorMessage); - errors.push_back(errorMessage); + pushMissingDllError("EngineFixesVR.dll or EngineFixes.dll"); } } else { if (!LoadLibrary(L"Data/SKSE/Plugins/EngineFixes.dll")) { - auto errorMessage = std::format("Required DLL {} was missing", stl::utf16_to_utf8(L"Data/SKSE/Plugins/EngineFixes.dll").value_or(""s)); - logger::error("{}", errorMessage); - errors.push_back(errorMessage); + pushMissingDllError(stl::utf16_to_utf8(L"Data/SKSE/Plugins/EngineFixes.dll").value_or(""s)); } } @@ -215,9 +217,7 @@ bool Load() for (const auto dll : requiredDLLs) { if (!LoadLibrary(dll)) { - auto errorMessage = std::format("Required DLL {} was missing", stl::utf16_to_utf8(dll).value_or(""s)); - logger::error("{}", errorMessage); - errors.push_back(errorMessage); + pushMissingDllError(stl::utf16_to_utf8(dll).value_or(""s)); } }