mirror of
https://github.com/rvtr/TDT.git
synced 2025-10-31 13:51:07 -04:00
Use keysDownRepeat() for cursor movement
This commit is contained in:
parent
923676b24a
commit
50192436ab
@ -104,6 +104,7 @@ void fifoHandler(u32 value32, void* userdata)
|
|||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
srand(time(0));
|
srand(time(0));
|
||||||
|
keysSetRepeat(25, 5);
|
||||||
_setupScreens();
|
_setupScreens();
|
||||||
|
|
||||||
//DSi check
|
//DSi check
|
||||||
|
|||||||
@ -203,19 +203,21 @@ bool moveCursor(Menu* m)
|
|||||||
m->changePage = 0;
|
m->changePage = 0;
|
||||||
int lastCursor = m->cursor;
|
int lastCursor = m->cursor;
|
||||||
|
|
||||||
if (keysDown() & KEY_DOWN)
|
u32 down = keysDownRepeat();
|
||||||
|
|
||||||
|
if (down & KEY_DOWN)
|
||||||
_moveCursor(m, 1);
|
_moveCursor(m, 1);
|
||||||
|
|
||||||
else if (keysDown() & KEY_UP)
|
else if (down & KEY_UP)
|
||||||
_moveCursor(m, -1);
|
_moveCursor(m, -1);
|
||||||
|
|
||||||
if (keysDown() & KEY_RIGHT)
|
if (down & KEY_RIGHT)
|
||||||
{
|
{
|
||||||
repeat(10)
|
repeat(10)
|
||||||
_moveCursor(m, 1);
|
_moveCursor(m, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (keysDown() & KEY_LEFT)
|
else if (down & KEY_LEFT)
|
||||||
{
|
{
|
||||||
repeat(10)
|
repeat(10)
|
||||||
_moveCursor(m, -1);
|
_moveCursor(m, -1);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user