Scaling...again

Everything else that doesn't fall into one of the other PB categories.
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Scaling...again

Post by jacdelad »

Hi,
I'm currently writing a tool which shall run on a Surface-Tablet. These are usually scaled. The following code always returns "100", regardless of the set scaling:

Code: Select all

If ExamineDesktops()
  Debug DesktopUnscaledX(100)
  Debug DesktopUnscaledY(100)
  Debug DesktopScaledX(100)
  Debug DesktopScaledY(100)
EndIf
Shouldn't the values be different? And yes, I activated the "DPI scaling"-function.
Windows 10H2, PureBasic 6.0 ASM.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Mesa
Enthusiast
Enthusiast
Posts: 345
Joined: Fri Feb 24, 2012 10:19 am

Re: Scaling...again

Post by Mesa »

Could be a stretching function of the monitor, have a look here
viewtopic.php?t=79828

M.
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Scaling...again

Post by jacdelad »

Ok, so I tried Ollis code from Mesas link. On my desktop it shows me 1.0 regardless of which scaling I set the desktop. On the surface it shows the correct scaling. BUT, shouldn't the option "DPI awareness" automatically scale alle gadgets and stuff?
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: Scaling...again

Post by jacdelad »

Oh, btw, I now had to turn of the scaling option, or it wouldn't work on the Surface. Since I scale my gadgets in %-of-screen it works.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
Post Reply