Nookz wrote: ↑December 13th, 2023, 10:00 pm
weird I tested by scaling all my monitors and it still returned the right values regardless which and if they were scaled or not. I probably forgot to restart powershell inbetween the tests or something silly like that..
I guess here goes my easy solution
I'll look into what Yincognito was saying earlier about finding the scaling of each monitor and making some math instead
When I have more time I'll do some more tests with it. Changing windows resolution and moving stuff on the Nvidia settings as well.
Edit.
Alright, testing:
Things to keep in mind during this test:
Native Screen Resolutions:
Screen 1: 2560 * 1080 (21:9 wide screen)
Screen 2: 3840 * 2160 (16:9 normal small (13") screen)
The correct width measure while zoomed to 300% should be 6400. (2560 + 3840)
Test:
Second Screen 100% (No scale) (3840 * 2160)
TrueWidth:6400
TrueHeight:2160
Skin works as expected.
Second Screen scaled up to 300% through windows config, but keeping 4K resolution. (3840 * 2160)
TrueWidth: 3840
TrueHeight:1080
Skin fails to recognize 1/3 of the screen, it should be width:6400 since resolution hasn't changed.
Second Screen 100%, but changed resolution through windows config to 1280 * 720 (300%)
TrueWidth: 3840
TrueHeight: 1080
Skin works as expected. Result is correct due to actual resolution changed to 1280.
Apparently there is no way to zoom in the screen on the Nvidia Settings without changing the screen resolution. So that's just a windows thing, that should be stored somewhere in the registry.