PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Left handed devices

Hi again PHal/PFrog programmers!

Surely pocketHal does a great job handling for us the correct graphic orientation also on landscape oriented devices; but i noticed the stylus coordinates are reported as they come from operating system.

I successfully remapped coordinates for landscape 640x480,320x240 and portrait 480x640;
but now i'm stucked on left handed deviced 8O
The stylus mapping i did is not working; i wonder if there is a way, through API's, to check if device is set in left-handed mode, so i can fix my stylus remapping routine also for them!

Thanks in advance for your support/patience :oops:
Mmm..just found on google....


Code:
// And to query the current mode use code:
DEVMODE devmode = {0};
devmode.dmSize = sizeof(DEVMODE);

devmode.dmFields = DM_DISPLAYORIENTATION;
ChangeDisplaySettingsEx(NULL, &devmode;, 0, CDS_TEST, NULL);


Then i could check if
devMode.dmDisplayOrientation = DMDO_0 or DMDO_90 or DMDO_180 or DMDO_270

Maybe this could work?

Tonight i'll test it !
It looks like all i need was the pocketfrog DeviceToLogical() function :evil:

Tonight i'll test also this :oops:
Ok, finally the light at the end of the tunnel!!

PocketFrog already remap stylus coords by itself; actually the problem was the user that reported the problem used a software hack to force landscape on ppc2003 :evil: )

On a real device in landscape mode it worked fine! :oops:

p.s: sorry if i wasted your bandwidth :roll: