lihas / windows-DPI-scaling-sample

App To mimic getting and setting DPI scaling for displays on a system
The Unlicense
109 stars 22 forks source link

Do you have a precompiled release? #2

Open hifihedgehog opened 3 years ago

hifihedgehog commented 3 years ago

I would like to download and use this program.

lihas commented 3 years ago

You can always find the binaries in x64/Debug/ folder. For convenience I have also created a release - https://github.com/lihas/windows-DPI-scaling-sample/releases/tag/v1.0 This is a 64 bit version. Tell me if it doesn't work for you.

hifihedgehog commented 3 years ago

You can always find the binaries in x64/Debug/ folder. For convenience I have also created a release - https://github.com/lihas/windows-DPI-scaling-sample/releases/tag/v1.0 This is a 64 bit version. Tell me if it doesn't work for you.

Thanks! Is there a way to force a scaling factor that isn't listed? I have particularly low resolution display, a marquee. The programs I use with it only work (that is, display to it, the secondary display) if both displays (primary and secondary, and the marquee is secondary) have a matching scaling factor. I only see 100 listed for the marquee. Since my primary display is high resolution and high DPI, using a low scaling factor for the primary display is undesirable. Any ideas?

hifihedgehog commented 3 years ago

Marquee (secondary display, 1280x390): image

hifihedgehog commented 3 years ago

Surface Pro 7 display (built-in, 2736 x 1824):

image

lihas commented 3 years ago

You can always find the binaries in x64/Debug/ folder. For convenience I have also created a release - https://github.com/lihas/windows-DPI-scaling-sample/releases/tag/v1.0 This is a 64 bit version. Tell me if it doesn't work for you.

Thanks! Is there a way to force a scaling factor that isn't listed? I have particularly low resolution display, a marquee. The programs I use with it only work (that is, display to it, the secondary display) if both displays (primary and secondary, and the marquee is secondary) have a matching scaling factor. I only see 100 listed for the marquee. Since my primary display is high resolution and high DPI, using a low scaling factor for the primary display is undesirable. Any ideas?

I can try forcing unsupported scaling factors. Will get back with results. However be warned that it may make your display unusable - for example scaling makes UI too large, and the utility that you are using - say this MFC exe we are talking about doesn't renders correctly or goes out of screen, making you unable to use it. If I am able to force unsupported values, I will try to include a revert timer - like one used by Microsoft display settings when you change resolution. This will be uncharted territory, so use caution.

hifihedgehog commented 3 years ago

However be warned that it may make your display unusable - for example scaling makes UI too large, and the utility that you are using - say this MFC exe we are talking about doesn't renders correctly or goes out of screen, making you unable to use it.

Thanks again! I actually expect this behavior since the start menu would be truncated graphically. In my case, though, I do not intend to use the secondary display as anything other than a marquee for the destined program, which is an arcade machine front-end UI. The problem is that Windows 10 seems to have a hard limitation in place that restricts users from choosing a scaling factor that could make the Windows UI unnavigable on the secondary display. If you can devise a hack around this, though, thank you so much!

lihas commented 3 years ago

I Tried setting DPI scaling value higher than max possible for a display. The OS simply sets the max supported value. For eg. if a display supports 100, 125, and 150% scaling, but you try to set 175%, the OS will simply set 150% as the scaling value. DisplayConfigSetDeviceInfo() returns no error.

Maybe if I patch OS dlls like User32.dll which has DisplayConfigSetDeviceInfo() API it can be done. That will require at least 2-3 days of effort, which I cannot spend right now.