Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUI does not respect Windows display scaling factor #2995

Open
jellyton255 opened this issue Dec 12, 2024 · 1 comment
Open

NUI does not respect Windows display scaling factor #2995

jellyton255 opened this issue Dec 12, 2024 · 1 comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@jellyton255
Copy link

jellyton255 commented Dec 12, 2024

What happened?

When rendering UI in game, NUI does not respect your windows scaling factor (set in your Display settings under "Scale & layout"), in general this is only affects users running on ultra high resolutions such as 3840x2160 with a scale set higher than 100%. The lack of proper scaling results in UI elements appearing uncomfortably small in game, whereas in a browser, they would appear as expected based on the chosen scale. Images below will illustrate this issue.

An interface in FiveM at 3840x2160 with 150% Windows display scaling
FiveM_b3095_GTAProcess - December11 - 23 59 - 4354

The same interface, in a browser at 3840x2160 with 150% Windows display scaling
chrome - December11 - 23 32 - 4352

The same interface, in a browser at 3840x2160 but with 100% Windows display scaling (equal to how it appears in game)
chrome - December12 - 00 02 - 4356

Scaling settings (for context)
ApplicationFrameHost - December12 - 00 01 - 4355

Expected result

UI should appear "scaled" as it does when viewed in the browser.

Reproduction steps

  1. Set "scale" in Windows display settings to a value greater than 100%.
  2. View any in game NUI element in FiveM.
  3. View that same NUI element in a browser.
  4. Observe the difference in scaling.

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

FiveM 11883

Additional information

nui_useFixedSize attempts to solve this issue but does not suffice as a true solution. NUI elements appear blurry, and too large.

@jellyton255 jellyton255 added bug triage Needs a preliminary assessment to determine the urgency and required action labels Dec 12, 2024
@jellyton255
Copy link
Author

I've gone ahead and fixed this issue, however I'm going to do some additional testing before I make a PR. jellyton255@e6091ae

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

1 participant