-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(nui): Fixed to be able to change the resolution setting of Fixed-size NUI #2397
Conversation
I'm confused why this is necessary? The only reason this option exists is because developers don't scale their UI properly for higher resolution monitors, see the original commit. If you're playing at 4k then you should ideally not have to use |
Thank you for presenting the original commit.
I agree with that opinion. Thank you. |
a90d65a
to
845dd2b
Compare
thats exactly why its locked at 1080p, changing the resoltuion it locks to, wouldnt make literally any "better" scaling experience, |
Let me talk about what made me decide to make this correction. |
yeah, that, isnt what this is intended for, or what it does |
OK :)
Hopefully one day this will happen as a different feature. |
I don't think this is completely right, this mode is meant to fix bad scaling by developers which seems to be what wacha is asking for, but I don't think this is the right approach to do it as it would be hidden and not very intuitive for the end user. Adding an option to switch between 1920x1080 & 2560x1440 might be worthwhile. |
- for players with larger screens (4160x2160) 1920x1080 might be too big this adds an option to scale to 1920x1080 or 2560x1440 - see citizenfx#2397 for more discussion
- for players with larger screens (4160x2160) 1920x1080 might be too big this adds an option to scale to 1920x1080 or 2560x1440 - see citizenfx#2397 for more discussion
- for players with larger screens (4160x2160) 1920x1080 might be too big this adds an option to scale to 1920x1080 or 2560x1440 - see citizenfx#2397 for more discussion
Goal of this PR
The purpose is to be able to change the resolution setting of Fixed-sizeNUI, which is one of the items in the FiveM settings.
The current implementation is fixed at 1920x1080, and when playing in 4K, the game cannot be set to 4K and the size of the NUI to WQHD, which lacks scalability, so this modification will make it possible.
How is this PR achieving the goal
By defining FixedSizeWindowX and FixedSizeWindowY in CitizenFX.ini, the resolution can be changed to any desired resolution.
If not defined, the resolution will be 1920x1080.
FixedSizeWindowX ranges is 640-7680
FixedSizeWindowY range is 480-4320
If this range is exceeded, the default is 1920x1080.
This PR applies to the following area(s)
FiveM, RedM
Successfully tested on
Platforms: Windows
Checklist
Fixes issues
N/A
Supplement
I was thinking of loading ini within NUIWindow::UpdateFrame(), but I thought it was not a good idea because UpdateFrame is a function that is called frequently.
As a result, we implemented it in a way that the file is loaded in Initialized and the value is held in a variable.
If there are any problems with this implementation, please let us know.
I am new to programming and may have implemented it incorrectly. My apologies.