-
Notifications
You must be signed in to change notification settings - Fork 20
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
Manipulate scaling percentage per resolution #69
Comments
Unfortunately there isn’t a Windows API call I am aware about that allows adjusting the monitor DPI setting. The only one I’ve found was essentially a reverse engineered call. If you happen to know the proper API calls for it I can implement it, otherwise I’d suggest getting a dummy plug and having the dummy plug set at 200% |
That is a bummer. The request was so I could manipulate the scaling factor of my dummy plug. When I mentioned being at my desktop I am streaming to my Mac. My Windows PC is a headless dedicated streaming machine. I’ll keep my eye out for a proper API |
There is a fork that seems to adjust scaling: main...danielmartina:ResolutionAutomation-custom:main. |
The parameter utilized, 0x009F is documented by Microsoft as “do not use” https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-systemparametersinfoa |
Also getting the vibe this is steps above recommended, which would mean I’d need a negative number at 1440p and that isn’t possible |
I tried that API call earlier and it completely broke my DPI scale dropdown. I couldn't pick a setting anymore and was forced to use custom scaling. Had to do a system restore to fix it again |
I was poking around at this again this morning and thought maybe looking for an API which applies a scaling factor is incorrect. If you run something like this...you get the virtual resolution of the desktop after the chosen scaling factor has been applied.
I wonder though if when you select the factor through Display Settings it isn't actually setting a percentage anywhere, it is just taking the desired frame buffer resolution, applying a reverse percentage (so 4k becomes 1920x1080 at 200%), then setting the virtual desktop size to that resolution. I saw a similar thing when working with Special-K, if it was made DPI aware it would report my resolution as a fraction of what I had set the actual display resolution to. Looking more through what's available from user32.dll though, I couldn't find anything which obviously provided a way to set that virtual desktop resolution. I am new to Windows API stuff so maybe I am not seeing it or not looking in the right place... |
I have the same need, looking forward to the update. |
(edited to fix mistake in code) I have a workaround for now. Using this executable, drop SetDPI.exe in the ResolutionMatcher folder and modify After
After
So that anything 1080p or higher will get a 125% scaling. You can adjust this to your liking. |
I often find myself wishing I could have Windows select a specific scaling factor based on resolution. When setting desktop resolution to 2560×1440 to play games sitting at my desk I prefer 100% but when I am connected via my Steam Deck at 2560x1600, I prefer 175% and 4k connected via my 55” TV, 200%.
Could you please add some mechanism for defining a resolution to scaling factor relationship?
The text was updated successfully, but these errors were encountered: