feat(HDR): warn users when in exclusive fullscreen#2187
Conversation
📝 WalkthroughWalkthroughAdds a static flag Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant Hook as hk_D3D11CreateDeviceAndSwapChain
participant HDR as HDRDisplay
participant UI as ImGuiSettings
App->>Hook: CreateDeviceAndSwapChain(request)
Hook->>Hook: enable HDR formats/effects
Hook->>HDR: set wasExclusiveFullscreen = !Windowed
Note right of HDR: stores exclusive-fullscreen flag
UI->>HDR: query wasExclusiveFullscreen / upscaling state
HDR--)UI: return flag
UI->>UI: show warning if exclusive fullscreen detected
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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.
|
No actionable suggestions for changed features. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/Hooks.cpp`:
- Around line 368-369: The code only sets HDRDisplay::wasExclusiveFullscreen to
true when modifiedDesc.Windowed is false, never clearing it later; change the
logic in the HDR swapchain creation path (the branch referencing
modifiedDesc.Windowed) to explicitly assign the flag based on the current
descriptor (e.g., set HDRDisplay::wasExclusiveFullscreen =
!modifiedDesc.Windowed or add an else that sets it to false) so the fullscreen
warning is cleared when a swapchain is recreated in windowed/borderless mode.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 605c1f97-59f1-4794-95e2-0d156a2a4ce0
📒 Files selected for processing (3)
src/Features/HDRDisplay.cppsrc/Features/HDRDisplay.hsrc/Hooks.cpp
|
✅ A pre-release build is available for this PR: |
davo0411
left a comment
There was a problem hiding this comment.
looks fine, if it's tested im happy
tested on my side and it worked fine |
HDR swapchain format expects borderless mode. Exclusive fullscreen works, but is fragile.
Closes #2181
Summary by CodeRabbit