#167287 - DiscoStew - Sun Mar 08, 2009 7:57 am
I don't know if I'm doing this the wrong way, but I have my code similar to this...
What I believe I should be expecting is that at the moment I hold down either Up or Down, it triggers once, then wait for 20 scanKeys() cycles before it starts repeating, and it repeats once every 10 scanKeys() cycles, correct?
Well, with trying to use it, I get nothing. No activity from keysDownRepeat(). Anyone else tried using them?
EDIT:
Please delete......it seemed that doing direct ANDing didn't work, but storing the result, and ANDing that does work.
_________________
DS - It's all about DiscoStew
Code: |
...
... keysSetRepeat( 20, 10 ); ... while( 1 ) { scanKeys(); ... ... if( keysDownRepeat() & KEY_UP ) ... else if( keysDownRepeat() & KEY_DOWN ) ... ... ... swiWaitForVBlank(); } |
What I believe I should be expecting is that at the moment I hold down either Up or Down, it triggers once, then wait for 20 scanKeys() cycles before it starts repeating, and it repeats once every 10 scanKeys() cycles, correct?
Well, with trying to use it, I get nothing. No activity from keysDownRepeat(). Anyone else tried using them?
EDIT:
Please delete......it seemed that doing direct ANDing didn't work, but storing the result, and ANDing that does work.
_________________
DS - It's all about DiscoStew