Page 1 of 1

Actual Stylus X and Y positions?

Posted: Mon Feb 14, 2011 2:47 am
by MisterFuzzy
Why does the function touch.px and touch.py return weird values rather than actual positions, 0 - 255, 0 - 191? I attached a file with my problem... Image

I am assuming this is normal, however. If so, how can I get an actual XY position? :|
Thanks in advance!

Re: Actual Stylus X and Y positions?

Posted: Mon Feb 14, 2011 11:26 am
by WinterMute
The pixel positions are within 0-255 & 0-191 although some values around the edges may not be available - this varies by console.

What may be confusing you here is that you're not erasing the old values when you print the new values, I think that's why you think you're seeing "weird" values. Just add two spaces on the end of your print strings, i.e.

Code: Select all

	iprintf("StylusX: %d  \n", touch.px);
	iprintf("StylusY: %d  \n", touch.py);