#33437 - simc - Mon Jan 03, 2005 10:52 am
My GBA app has some code that polls buttons looking for a Keydown, on which it returns the buttons pressed. When the button is held for too long, it also returns when you release the button, but this only occurs on the GBA but doesn't seem to occur in VBA. I'm not sure if it is a problem with my code (most likely) or my GBA.
Here is the function that should return keys pressed since the last poll.
This is for a flashcard app for learning chinese using Practical Chinese Reader. Its should be ready for release after this is fixed. Tell me if it interests you at all :-)
The binary is available at http://www.baud-bandit.com/simon/pcr_flash_vol1.zip. I'm going to post the source to this page shortly http://www.baud-bandit.com/simon/stuff.html.
Here is the function that should return keys pressed since the last poll.
Code: |
// in auxfunctions.c u16 getinput() { OldInputFromKeyInterrupt = InputFromKeyInterrupt; InputFromKeyInterrupt = ~KEYS; // we only want keydowns OldInputFromKeyInterrupt = OldInputFromKeyInterrupt & InputFromKeyInterrupt; return (InputFromKeyInterrupt & ~OldInputFromKeyInterrupt); } |
This is for a flashcard app for learning chinese using Practical Chinese Reader. Its should be ready for release after this is fixed. Tell me if it interests you at all :-)
The binary is available at http://www.baud-bandit.com/simon/pcr_flash_vol1.zip. I'm going to post the source to this page shortly http://www.baud-bandit.com/simon/stuff.html.