only wrap on a new press not a repeat
This commit is contained in:
parent
54e1590c0f
commit
103e21d54a
1 changed files with 27 additions and 17 deletions
|
|
@ -1256,6 +1256,10 @@ int main (int argc, char *argv[]) {
|
|||
|
||||
if (total>0) {
|
||||
if (PAD_justRepeated(BTN_UP)) {
|
||||
if (selected==0 && !PAD_justPressed(BTN_UP)) {
|
||||
// stop at top
|
||||
}
|
||||
else {
|
||||
selected -= 1;
|
||||
if (selected<0) {
|
||||
selected = total-1;
|
||||
|
|
@ -1268,7 +1272,12 @@ int main (int argc, char *argv[]) {
|
|||
top->end -= 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (PAD_justRepeated(BTN_DOWN)) {
|
||||
if (selected==total-1 && !PAD_justPressed(BTN_DOWN)) {
|
||||
// stop at bottom
|
||||
}
|
||||
else {
|
||||
selected += 1;
|
||||
if (selected>=total) {
|
||||
selected = 0;
|
||||
|
|
@ -1280,6 +1289,7 @@ int main (int argc, char *argv[]) {
|
|||
top->end += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (PAD_justRepeated(BTN_LEFT)) {
|
||||
selected -= MAIN_ROW_COUNT;
|
||||
if (selected<0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue