Skip to content

Fix widescreen HUD scaling and script aspect ratio alignment - #5563

Open
MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:fix/widescreen-hud-scaling
Open

MohabCodeX wants to merge 4 commits into
multitheftauto:masterfrom
MohabCodeX:fix/widescreen-hud-scaling

Conversation

@MohabCodeX

Copy link
Copy Markdown
Contributor

Fixes #848
Closes #333

image image

Instead of stretching HUD height on widescreen displays, this keeps vertical proportions fixed and scales the HUD horizontally to fit the screen's aspect ratio. It also resolves the HUD scaling part of #2753 so HUD elements no longer blow up vertically on ultrawide monitors like 32:9.

Weapon icons, centered vehicle and area names, and crosshairs now stay properly proportioned and positioned alongside the radar and bars across 16:9, 21:9, and 32:9 resolutions without height inflation workarounds.

Aspect ratio adjustment for DX drawing and GUI positioning (dxSetAspectRatioAdjustmentEnabled and guiSetPosition) now converts horizontal coordinates rather than vertical ones so custom HUD scripts and resources like customblips stay lined up with the radar and right-side HUD. When the HUD match aspect ratio setting is disabled, scripts written for non-4:3 aspect ratios are still adjusted cleanly against the 4:3 HUD, and non-positive or non-finite source ratios are rejected.

Keep PR 1 focused on HUD scaling and horizontal aspect-ratio conversion changes without extra test boilerplate.
Copilot AI balanced review requested due to automatic review settings November 18, 2026 07:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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.

Widescreen Hud Placement dxSetAspectRatioAdjustmentEnabled fix

2 participants