Repository navigation
Conversation
…cal pixels gta6rt.exe had no DPI awareness in its manifest, and a mapped title creates its windows in gta6rt's process, so on a scaled display Windows gave the title a smaller logical desktop and stretched what it drew. src/gta6rt.manifest declares PerMonitorV2 (PerMonitor on 1607, true/pm before) and is merged into the linker's default manifest by CMake and by the cl.exe fallback. DXGI ResizeTarget sizes the frame with AdjustWindowRectExForDpi at the window's DPI, which under PerMonitorV2 can differ from the system DPI that AdjustWindowRectEx uses (falls back to it where the call is missing). Measured with a probe title under gta6rt --run, 3840x2160 at 225%, RTX 3070: - borderless window at the monitor rect: client and Vulkan currentExtent 1707x960 before, 3840x2160 after - windowed 1920x1080 client: 1711x941 before, 1920x1080 after - rcMonitor (DXGI DesktopCoordinates): 1707x960 before, 3840x2160 after, matching the current mode; GetDpiForWindow 96 before, 216 after Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Grimkaaah
reviewed
Nov 23, 2026
Grimkaaah
left a comment
Contributor
There was a problem hiding this comment.
Independent Linux CPU review
What changed: gta6rt is per-monitor DPI aware so a mapped title's window is in physical pixels.
Checked: diff review of manifest + dxgi_com.cpp + build scripts (no local runtime build).
Looks correct; no game files.
abnalstlll-byte
approved these changes
Nov 23, 2026
abnalstlll-byte
left a comment
Contributor
There was a problem hiding this comment.
Independent Windows review (commit \e40f57ef3fe22d8959fd8bf3104e0b8f2854d25f)
What changed:
untime/src/gta6rt.manifest:- Embeds \PerMonitorV2,PerMonitor\ DPI awareness into \gta6rt, preventing Windows DWM bitmap stretching on high-DPI displays.
untime/shims/dxgi_com.cpp:- In \ResizeTarget, calls \AdjustWindowRectExForDpi\ dynamically via \GetProcAddress\ with fallback to \AdjustWindowRectEx.
- \scripts/build_runtime.ps1\ &
untime/CMakeLists.txt:- Integrates manifest into standalone and CMake build systems.
Verification:
- Verified on Windows 11 host with MSVC: window dimensions compute cleanly in physical device pixels across DPI scaling.
- Clean diff: no game files.
LGTM!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as: #8683 (comment)
What and why
gta6rt.exewas DPI-unaware: its manifest had onlyrequestedExecutionLevel, and nothing inruntime/sets DPI awareness. A mapped title creates its window insidegta6rt's process, so on a display scaled above 100% Windows gave the title a smaller logical desktop and bitmap-stretched the result.runtime/src/gta6rt.manifestdeclares per-monitor DPI awareness (PerMonitorV2,PerMonitor, plustrue/pmfor older Windows). It is a source ofadd_executable(gta6rt ...), so the linker merges it into its default manifest (checked withmt.exe:asInvokerkept, both DPI entries added), and the cl.exe fallback inscripts/build_runtime.ps1passes the same file with/MANIFEST:EMBED /MANIFESTINPUT:.ResizeTarget(runtime/shims/dxgi_com.cpp) sized the window frame withAdjustWindowRectEx, which uses the system DPI. Per-monitor aware, a window on a monitor at another scale needs the frame at its own DPI, so it now usesAdjustWindowRectExForDpiwithGetDpiForWindow(looked up at run time;AdjustWindowRectExwhere they are missing, as on older Windows or Wine). Found in review (Codex): in a PMv2 process a 640x480 client got a 668x559 frame fromAdjustWindowRectExwhere 144 DPI needs 662x536.runtime/README.md: one paragraph on what the manifest does.Tested
NVIDIA GeForce RTX 3070, driver 617.14, Windows 11 25H2, one 3840x2160 display at 225% (216 DPI), MSVC 17.14, Vulkan SDK 1.4.363.0, on
main867d922f.A small MSVC-built probe run as the title with
gta6rt --run(it creates a window, reads the values below and creates a Vulkan surface; no game files):GetDpiForSystemSM_CXSCREENxSM_CYSCREEN,rcMonitor(DXGIDesktopCoordinates)currentExtentcurrentExtentClipCursorto the borderless clientd3d12_vulkan_device,d3d12_depth_resolve,d3d12_present,d3d12_indirect_rt) fail the same way onmainon this machine and have open fixes (d3d12_vulkan_device: check PC CreateReservedResource2 behind the Xbox proxy, not through slot 78 #7125, d3d12: an ARRAY_OF_POINTERS entry below the arena is not an overflow (d3d12_indirect_rt on NVIDIA) #6010, d3d12_present_test: read the screen pixel in physical coordinates on a scaled display #8456 ford3d12_present). After theResizeTargetchange:loader,loader_tls, everyrun_*test,dxgi_device,dxgi_swapchain(including itsResizeTargetclient-size check),dxgi_swapchain_countandxbox_presentpass.asInvokerand runs per-monitor v2.tests/test_build_runtime_fallback.py: 7 of 8, the same asmain(the failing case isshims\xg_xs.cppmissing from the fallback list since runtime: xg_xs.dll shim, XGCreateTextureComputer and XGSuggestSwizzleMode as traced E_NOTIMPL (RT-489) #6891; open PRs fix it).What a title may notice: on a scaled display it now gets physical sizes, so a "fullscreen" swapchain is the monitor's real size (here 3840x2160 instead of 1707x960, about 5x the pixels), and a title that handles
WM_DPICHANGEDnow receives it. Nothing changes at 100%. The D3D12 test programs do not get the manifest.Not tested: a second monitor at a different scale (single display here, so the
AdjustWindowRectExForDpibranch gives the same frame as before), the clang-cl + xwin cross-build on Linux (its llvm-mt needs libxml2), Wine/Proton, the real title.AI-assisted: yes (Claude Code wrote and ran it; Codex reviewed it).
Checklist
docs/design.md, with how it was confirmed. (not applicable)🤖 Generated with Claude Code