Scaling...again

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

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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Mesa
Enthusiast
Enthusiast
Posts: 433
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: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

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?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
User avatar
jacdelad
Addict
Addict
Posts: 2010
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
Post Reply