Touch coordinates are always zeroed

Post Reply
Rajveer
Posts: 8
Joined: Sat Jan 24, 2009 11:37 pm

Touch coordinates are always zeroed

Post by Rajveer » Sat Oct 06, 2018 6:47 pm

I'm getting an old game of mine compiling again against the latest libnds, the last one it was compiled with was 1.5.3. The problem I'm having is that touchRead() is always returning (0,0). I'm testing on a DSi with Unlaunch 1.7, booting it through hbmenu, and the older binary of my game as well as the latest touch examples work fine so it's not my hardware. I've taken the latest arm7 template.c and also updated my makefiles to match. Is there anything I could be missing?

Rajveer
Posts: 8
Joined: Sat Jan 24, 2009 11:37 pm

Re: Touch coordinates are always zeroed

Post by Rajveer » Sat Oct 06, 2018 11:34 pm

After some investigation it looks like there is an issue with the templates\combined example, as when compiling that and running it on my DSi I see that the raw touch coordinates get set but not the pixel coordinates. The 3 touch examples in input\Touch_Pad work fine when compiled and run. Perhaps there has been some touch initialisation changes that hasn't made it's way in to the combined template example?

EDIT: Looks like it's as simple as adding touchInit() to the arm7 code, now everything is working :)

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests