Also fix off-by-ones

This commit is contained in:
Stefan `Sec` Zehl 2011-07-17 12:38:50 +02:00
parent 6ca793a6ca
commit baf59c0c1f
1 changed files with 2 additions and 2 deletions

View File

@ -106,11 +106,11 @@ void f_nick(void){
if(key==BTN_UP){
if(--y<0) y=0;
}else if (key ==BTN_DOWN){
if(++y>RESY) y=RESY;
if(++y>=RESY) y=RESY-1;
}else if (key ==BTN_LEFT){
if(--x<0) x=0;
}else if (key ==BTN_RIGHT){
if(++x>RESX) x=RESX;
if(++x>=RESX) x=RESX-1;
}else if (key ==BTN_ENTER){
lcdClear();
lcdPrintln("Done.");