Skip to content

fix(session): announce real display DPI instead of hardcoded Mac 144 - #1367

Merged
capy-ai[bot] merged 2 commits into
OpenCloudGaming:devfrom
Alexis-D-ff:fix/session-monitor-dpi
Nov 3, 2026
Merged

capy-ai[bot] merged 2 commits into
OpenCloudGaming:devfrom
Alexis-D-ff:fix/session-monitor-dpi

Conversation

@Alexis-D-ff

@Alexis-D-ff Alexis-D-ff commented Oct 28, 2026 •

Copy link
Copy Markdown

Summary

  • Replace the hardcoded dpi: 144 (macOS) / 96 (else) in clientRequestMonitorSettings with the active display's physical DPI: (logical size × devicePixelRatio × 25.4) / physicalSize_mm.
  • Pass screenDpi / devicePixelRatio from the Qt client on session.create so remote Windows UI scaling (e.g. Battle.net chrome) matches HiDPI panels.
  • Add GFN's documented Mac 3.5K preset 3456×2160 under 16:10, and allow that mode through the H.264 embedded pixel gate (official GFN streams it as H.264).

Why

On Retina Macs, Qt's physicalDotsPerInch() alone under-reports (~128). The old fixed 144 made launcher UI look smaller than stock GeForce NOW. Using framebuffer pixels / panel mm yields ~255 on a 14″ MBP and is the same formula for Win/Linux when EDID physicalSize is present.

Caveats

  • If the OS/EDID reports empty physicalSize, falls back to physicalDotsPerInch(), then 96 × devicePixelRatio.
  • Multi-monitor: uses the focused/primary screen at session create.
  • Verified manually on MacBook Pro 14″ with 3.5K vs GFN Battle.net UI size.

Test plan

  • cargo test --bin opennow-core session_dpi_uses_reported_screen_dpi
  • cargo test --bin opennow-core embedded_resolution_fallbacks_match_the_qt_supported_mode_catalog
  • cargo test --bin opennow-core embedded_codec_caps_and_decode_dimensions_are_session_local
  • Manual: Mac Retina — set 3.5K, confirm Battle.net chrome size ≈ GFN
  • Manual: external 1080p/4K monitor — confirm DPI changes with the active display
  • Manual: Windows HiDPI (125%/150%) smoke if available

Made with Cursor

Compute physical DPI as (logical size × devicePixelRatio) / panel mm and
send it in clientRequestMonitorSettings so remote Windows UI scaling
matches Retina and other HiDPI displays. Also expose GFN's Mac 3.5K
(3456x2160) preset in the 16:10 catalog.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2fdf6dd5-937c-4878-836c-55fd36a680cd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 3555c04 into OpenCloudGaming:dev Nov 3, 2026
12 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.

2 participants