#166514 - ChronoDK - Mon Feb 09, 2009 10:31 am
Touch input has stopped working here. I'm porting some code I had to the latest devkitpro, and now this wont work:
Code: |
//Scan key states
scanKeys();
//Current touch position
touchPosition touch;
touchRead(&touch);
if ( keysHeld() & KEY_TOUCH ) {
//do something
|
touch.px and touch.py is always zero :(
Is there something wrong in the above code, or should I look elsewhere for a solution?
#166525 - Pete_Lockwood - Mon Feb 09, 2009 11:49 am
On hardware? Or which emu?
_________________
It's not an illusion, it just looks like one.
#166527 - ChronoDK - Mon Feb 09, 2009 12:42 pm
Both hardware, no$gba and NDeSmuME. The TouchTest example from devkitpro works on both and hardware and no$gba, but not in NDeSmuME).
#166560 - ChronoDK - Mon Feb 09, 2009 8:24 pm
Did nobody experience something like this? I must be forgetting to do something somewhere - I just don't know what :(
Perhaps something makefile related?
#166561 - elhobbs - Mon Feb 09, 2009 8:31 pm
make sure you are not using irqInit() on the arm9 side - it gets called before main now. if you call it in your code it breaks the default FIFO implementation. are you using the default arm7 or are you using custom code? the touch info is sent to the arm9 using FIFO in the latest libnds so it requires the newer arm7 code.
also, what is Ndesmume? how old is it and does it support FIFO? the current version is called desmume at http://desmume.org
#166562 - ChronoDK - Mon Feb 09, 2009 8:41 pm
Thanks - that did it! irqInit() was the culprit.
Hmm, that new emulator wont work with my game - maybe I'm doing something else wrong as well?
#166563 - elhobbs - Mon Feb 09, 2009 8:54 pm
what is the problem? if you are using libfat then you need to make sure you are using the dlditool to add the "GBA Movie Player (Compact Flash)" dldi driver. the new libfat does not have any drivers builtin any longer.
#166572 - ChronoDK - Mon Feb 09, 2009 10:56 pm
I'm using EFS when running on emulators and libfat when running on hardware. Works fine on hardware and no$gba, so I'm okay for now. Just curious why it wont work in that new emulator as well.