PocketMatrix forums

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

VGA resolution devices and stylus events

Thomas Sempf · 29 Dec 2004, 10:40 UTC
Hello,

I have some problems with devices which have a VGA resolution. The stylus events I get are very strange. I am not setting the HI_RES_AWARE flag and I don't have a HI_RES_AWARE resource in my project. When I am in normal device orientation I get still VGA resolution coordinates (640x480), but when I rotate the display I get coordinates between x -320 and 320 and y 0 and 480. Why that?

Thomas
What device? Are you running it in "native" VGA using SE_VGA or another tool?
Thomas Sempf · 29 Dec 2004, 13:38 UTC
I am using a HP iPAQ hx4700 without using any tools.
Ok, same device as I use. Are you using the final GapiDraw 3.5, and not one of the beta releases? There were a couple of issues with the early betas...
I had the same problem. See my thread here for a fix.

http://www.pocketmatrix.com/forums/view ... hp?t=19767
Thanks Chris.

Thomas: Please let me know if this resolves your issue. If it does I'll incorporate a "real" fix in GapiDraw 3.51 due out shortly.
Hello Chris,

yes I saw your fix and I am using it at the moment. Additionally I had to add following code for rotated modes:

Code:

if(m_bIsTrueVGA == TRUE && m_config.dwDisplayMode == GDDISPMODE_NORMAL)
{
p.x = p.x >> 1;
p.y = p.y >> 1;
}
else if(m_bIsTrueVGA == TRUE && m_config.dwDisplayMode == GDDISPMODE_ROTATE90CCW) {
p.x += 320;
p.x = p.x >> 1;
p.y = p.y >> 1;
}


Maybe the code must look a little bit different when the device is rotated with the GDDISPMODE_ROTATE90CW flag, but I am only rotating CCW :)

--Thomas
Thanks for letting me know. I'll see to it that this is corrected in 3.51 due out shortly.
Thomas/Stunad: I simply cannot reproduce this issue on my hx4700. Do you think you guys could help me out here?

Load the Collision Mask sample application. Remove the resource "HI_RES_AWARE" in the "CEUX" category, and change line 22 in "myapplication.cpp" so that "config.dwDisplayFlags = 0;"

You can test pen input an navigational input in the sample. On my hx4700 it works perfectly.
Thomas Sempf · 10 Jan 2005, 07:54 UTC
Okay, after some debugging I found out that I made a mistake. There was still a HI_RES_AWARE resource in the exe file(the porject is a little bit bigger here and actually my GapiDraw code is running as a dll). It works as expected now. You only get problems if you link against PocketHAL, cause the current version doesn't support hi-res devices. With PocketHAL the graphic will be in 320x240 emulation mode and the inputs in 640x480 mode(if you have a HI_RES_AWARE resource).
Thanks Thomas, this was as I suspected.

Stunad: Can you please also verify this?

//Johan