Skip to content

fix: fix engine fixes requirement on vr#1461

Merged
doodlum merged 2 commits into
devfrom
enginefixes-vr-fix
Sep 12, 2025
Merged

fix: fix engine fixes requirement on vr#1461
doodlum merged 2 commits into
devfrom
enginefixes-vr-fix

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Sep 9, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Correctly loads the VR-specific engine fixes when running in VR, improving compatibility and preventing startup issues for VR users.
    • Maintains existing behavior for non‑VR sessions, ensuring no regressions for standard gameplay.
    • Preserves the established loading and error reporting flow for consistent diagnostics.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 9, 2025

Walkthrough

Load() 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

Cohort / File(s) Summary
Conditional EngineFixes DLL selection
src/XSEPlugin.cpp
Load() switches requiredDLLs entry to EngineFixesVR.dll when VR is detected; defaults to EngineFixes.dll otherwise. No other logic altered.

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
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • jiayev
  • alandtse

Pre-merge checks (1 passed, 2 warnings)

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request currently lacks a description in its description field, so there is no contextual information about the changes beyond the raw diff summary. Please add a concise description summarizing the change—namely that Load() now selects EngineFixesVR.dll when VR is active and otherwise uses EngineFixes.dll—along with any relevant error handling notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title “fix: fix engine fixes requirement on vr” uses the conventional commit prefix and accurately reflects the core change of selecting a different engine fixes DLL when VR is active, even though the repeated “fix” is slightly redundant.

Poem

A hop, a check: is VR near?
I twitch my ears—pick DLL clear.
One path for flats, one path for VR,
Load the fix, we’re set to star.
Thump-thump logs if errors call—
Carrot compiled, no drops at all. 🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch enginefixes-vr-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

Using provided base ref: 01da25a
Using base ref: 01da25a
Base commit date: 2025-09-09T20:33:25+01:00 (Tuesday, September 09, 2025 08:33 PM)
No actionable suggestions for changed features.

Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
src/XSEPlugin.cpp (1)

186-189: Nit: compute the DLL path once for readability

Slightly 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

📥 Commits

Reviewing files that changed from the base of the PR and between 01da25a and e920d89.

📒 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 selection

Choosing EngineFixesVR.dll when REL::Module::IsVR() is true addresses the VR requirement without affecting SE/AE. Nice, targeted fix.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 9, 2025

✅ A pre-release build is available for this PR:
Download

@doodlum doodlum merged commit 1db6001 into dev Sep 12, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant