fix: fix engine fixes requirement on vr#1461
Conversation
WalkthroughLoad() in src/XSEPlugin.cpp now conditionally selects EngineFixesVR.dll when VR is active; otherwise it selects EngineFixes.dll. The remainder of the DLL loading and error reporting flow is unchanged. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Game
participant Plugin as XSEPlugin
participant Sys as OS Loader
Game->>Plugin: Load()
Plugin->>Plugin: Detect VR mode
alt VR active
Plugin->>Plugin: Select "EngineFixesVR.dll"
else Non‑VR
Plugin->>Plugin: Select "EngineFixes.dll"
end
Plugin->>Sys: LoadLibrary(selected DLL)
alt Load OK
Sys-->>Plugin: Handle
Plugin-->>Game: Success
else Load Error
Sys-->>Plugin: Error
Plugin-->>Game: Report failure
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Pre-merge checks (1 passed, 2 warnings)❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/XSEPlugin.cpp (1)
186-189: Nit: compute the DLL path once for readabilitySlightly clearer and avoids re-evaluating IsVR() in the initializer list.
Apply this diff:
-const std::array requiredDLLs = { - REL::Module::IsVR() ? L"Data/SKSE/Plugins/EngineFixesVR.dll" : L"Data/SKSE/Plugins/EngineFixes.dll" -}; +const auto engineFixesDll = + REL::Module::IsVR() ? L"Data/SKSE/Plugins/EngineFixesVR.dll" : L"Data/SKSE/Plugins/EngineFixes.dll"; +const std::array requiredDLLs = { engineFixesDll };
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/XSEPlugin.cpp(1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{cpp,cxx,cc,c,h,hpp,hxx,hlsl,hlsli,fx,fxh,py}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Do not include TODO/FIXME placeholders; provide complete, working solutions
Files:
src/XSEPlugin.cpp
src/**/*.{cpp,cxx,cc,h,hpp,hxx}
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.{cpp,cxx,cc,h,hpp,hxx}: Ensure SE/AE/VR runtime compatibility; use runtime detection patterns (e.g., REL::RelocateMember())
Include robust error handling and resource management with graceful degradation in the plugin code
Files:
src/XSEPlugin.cpp
🧠 Learnings (1)
📓 Common learnings
Learnt from: alandtse
PR: doodlum/skyrim-community-shaders#0
File: :0-0
Timestamp: 2025-07-05T05:20:45.823Z
Learning: In the skyrim-community-shaders repository, file deletion error handling improvements that replace existence checks and try-catch blocks with std::filesystem::remove error-code-based approaches are considered bug fixes rather than refactoring, as they address inadequate error handling and misleading log messages.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Build plugin and addons
🔇 Additional comments (1)
src/XSEPlugin.cpp (1)
186-189: LGTM: Correct VR-aware Engine Fixes selectionChoosing EngineFixesVR.dll when REL::Module::IsVR() is true addresses the VR requirement without affecting SE/AE. Nice, targeted fix.
|
✅ A pre-release build is available for this PR: |
Summary by CodeRabbit