1
0
mirror of git://projects.qi-hardware.com/gmenu2x.git synced 2025-04-21 12:27:27 +03:00

Rewrote the whole input system.

Gmenu2X will no longer eat 100% CPU ;)
This commit is contained in:
Ayla
2010-09-17 22:34:26 +02:00
parent c6c3dfe8e0
commit 563cb34a89
24 changed files with 693 additions and 388 deletions

View File

@@ -105,11 +105,39 @@ bool SettingsDialog::exec() {
gmenu2x->s->flip();
voices[sel]->handleTS();
bevent_t event;
do {
inputMgr.waitForEvent(&event);
} while (event.state != PRESSED);
switch (event.button) {
case SETTINGS:
close = true;
break;
case UP:
if (sel==0)
sel = voices.size()-1;
else
sel -= 1;
gmenu2x->setInputSpeed();
voices[sel]->adjustInput();
break;
case DOWN:
sel += 1;
if (sel>=voices.size()) sel = 0;
gmenu2x->setInputSpeed();
voices[sel]->adjustInput();
break;
default:
voices[sel]->manageInput(&event);
break;
}
/*
inputMgr.update();
if ( inputMgr[ACTION_START] ) action = SD_ACTION_CLOSE;
if ( inputMgr[ACTION_UP ] ) action = SD_ACTION_UP;
if ( inputMgr[ACTION_DOWN ] ) action = SD_ACTION_DOWN;
voices[sel]->manageInput();
switch (action) {
case SD_ACTION_CLOSE: close = true; break;
@@ -128,6 +156,7 @@ bool SettingsDialog::exec() {
voices[sel]->adjustInput();
} break;
}
*/
}
gmenu2x->setInputSpeed();