Make getInputWaitTimeout use microseconds

This commit is contained in:
Stefan `Sec` Zehl 2011-08-05 00:24:50 +02:00
parent 81815b1eef
commit c2d7656a1e
3 changed files with 4 additions and 4 deletions

View File

@ -54,7 +54,7 @@ uint8_t getInputWaitTimeout(int timeout) {
uint8_t key;
if(timeout==0)
return getInputWait();
int end=_timectr+timeout*(1000/SYSTICKSPEED);
int end=_timectr+timeout/SYSTICKSPEED;
while ((key=getInputRaw())==BTN_NONE){
if(_timectr>end)
break;

View File

@ -46,7 +46,7 @@ void handleMenu(const struct MENU *the_menu) {
}
lcdRefresh();
switch (getInputWaitTimeout((menuflags&MENU_TIMEOUT)?15:0)) {
switch (getInputWaitTimeout((menuflags&MENU_TIMEOUT)?15000:0)) {
case BTN_UP:
menuselection--;
if (menuselection < current_offset) {

View File

@ -127,7 +127,7 @@ static bool screen_intro() {
DoString (0, 9, highnick);
lcdDisplay();
step = !step;
key=getInputWaitTimeout(1);
key=getInputWaitTimeout(1000);
}
return !(key==BTN_LEFT);
}
@ -142,7 +142,7 @@ static bool screen_gameover() {
if (highscore_set(game.score, GLOBAL(nickname)))
DoString (0,9,"HIGHSCORE!");
lcdDisplay();
key=getInputWaitTimeout(5);
key=getInputWaitTimeout(5000);
}
return !(key==BTN_LEFT);
}