Win-8 Touch return wrong coordinates

Archives Forums/BlitzMax Bug Reports/Win-8 Touch return wrong coordinates

Midimaster(Posted 2013) [#1]
I tested some of my MINIs on a Win-8 tablet PC Acer Iconia W700.

It's display has 1920x1080 pixel and for being able to read anything in the file explorer I adjusted the scaling of elements to 150% in graphic card settings. (sorry I do not know the exact engl. terms for this.)

Well my MINIs are always 1024x768pix. At first I was really surprised, that Win-8 also enlarged my game window and scaled up all content.

But now the games are to high to fit into the screen. They seem to be ca. 1536x1152, So the top of the game is beyond the screen top.

When I click around with the mouse, everything works perfect. But when I use the Touch-Screen, my game receives incorrect y-values.

Here is one MINI, you can test it:

http://www.midimaster.de/download/duett_demo.exe






When I restore the graphic card settings to 100% everything works fine.


SLotman(Posted 2013) [#2]
I don't know about tablets, but win8 desktop it works perfectly fine (at least my game, didn't test yours)


Midimaster(Posted 2013) [#3]
Did you test it with scaling of 150%? Did you test it with a Touchscreen? The bug occurs only in the combination of both!


SLotman(Posted 2013) [#4]
Don't know about the 'scaling' thing (my game just resizes to whatever resolution the desktop is), but yeah, I tested it on a HP Touchsmart - so it is a touchscreen.But again, a desktop computer, not a tablet.


Midimaster(Posted 2013) [#5]
If you did not test it, you cannot say it workes....

The problem is I do not know the corresponging english terms microsoft uses for graphic card settings on english windows versions.

So perhaps somebody can help me descriping the bug.

I try to explain:
Normally windows has "properties" of "graphic card" in "system control". You reach this with right click on the screen. There you find some register cards. One of them shows information about your graphic card. And one of them has a possibility to select 100%, 125% and 150%.

A lot of users of high density notebooks and tablets now select 150% because 1920-1080pix on 11' display results in very small windows elements.

In former times the BlitzMax canvas was not affected by this setting. And a 1024x768 canvas was still a 1024x768 canvas and was smaller than the display.

Now on Win-8 the canvas size is stretched and suddenly bigger than the display. But Blitzmax still reports 1024x768 for the canvas. A blitzmax game, which formerly resized to the displays borders like yours, would now resize to a much to large canvas, where only the center of it is visible on the screen. There is no change to reach the top buttons like RESIZE, QUIT

Try to find this windows setting, adjust it to 150% and start one of your games....


jsp(Posted 2013) [#6]
I think what you mean is the display dpi setting.
http://www.sevenforums.com/tutorials/443-dpi-display-size-settings-change.html


Normally the fonts on the MaxGui gadgets are affected but not the canvas, that is new.

You could try to add a manifest file to your app with an additional section to handle that.
http://www.rw-designer.com/DPI-aware


GaryV(Posted 2013) [#7]
Anything made for Windows and running in a window, needs to be high dpi aware. If you write it properly, you will not have this issue and your program will resize everything accordingly. Few programming languages support it natively and legacy products can be very troublesome. The easiest way is to handle it via the manifest.


Midimaster(Posted 2013) [#8]
Thank you both for this information. I will add this to my MINIs and see what happens.


ziggy(Posted 2013) [#9]
BLIde allows you to set your App as DPI aware when it is published.