DPI aware scaling bug, important 5.73
While working on the new FontMaster I suddenly noticed that the
OS automatic upscaling did no longer work for scales over 100%.
Restarting the OS and reinstalling PB does not help.
Reducing the code down to pure OpenWindow did not help either.
Copying the code into a new file eliminates the problem.
Then you have two exactly same small codes.
Upscaling works with one but not with the other.
PB does not forget the defective file, the mechanism behind it is unknown to me.
If you create exe from both files, the error is gone.
Another method to remove the error you can see in the gif.
The code is started in the degugger, then it is started a second time with the separate debugger.
By this second start with the separate debugger the error is removed.
I athink that the error is triggered when a code is started with a windowed screen in DPI aware.
Now I know why many people have problems with DPI aware and want the constant to prompt them to switch on DPI aware.
If DPI aware is implemented correctly it does not matter if it is switched on in the compiler or not, the sizes are always the same.
But with this error you can drive everyone almost crazy.
Most people are unlikely to recognise the cause, as they are not familiar with DPI aware
I made a little code,
A very strange thing, but very bad.
I have seen this error several times, with different codes, but I have never been able to find the cause and a way to remove.
It probably has something to do with the debugger..
If you cannot compare the results it is very difficult and annoying to program DPI aware.
Especially such tools must run without problems with and without DPI aware, otherwise they cannot
be used in any other codes.
Code:
InitSprite()
Define window_ID=OpenWindow(#PB_Any, 0, 0, 960, 470,
"",
#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
Define canvas_2_ID=OpenWindowedScreen(WindowID(window_ID),
0, ; output_x
0, ; output_y
960*DesktopResolutionX(), ; gadget_width
470*DesktopResolutionX()) ; gadget_height
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow

