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...
I am assuming this is normal, however. If so, how can I get an actual XY position?
Thanks in advance!
Actual Stylus X and Y positions?
-
- Posts: 4
- Joined: Sat Feb 12, 2011 6:35 am
Actual Stylus X and Y positions?
- Attachments
-
[The extension nds has been deactivated and can no longer be displayed.]
-
- Site Admin
- Posts: 2003
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: Actual Stylus X and Y positions?
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.
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);
Who is online
Users browsing this forum: Ahrefs [Bot] and 2 guests