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

@@ -82,15 +82,23 @@ void MenuSettingRGBA::handleTS() {
MenuSetting::handleTS();
}
void MenuSettingRGBA::manageInput() {
if (gmenu2x->input[ACTION_Y])
inc();
if (gmenu2x->input[ACTION_X])
dec();
if (gmenu2x->input[ACTION_LEFT])
leftComponent();
if (gmenu2x->input[ACTION_RIGHT])
rightComponent();
void MenuSettingRGBA::manageInput(bevent_t *event) {
switch(event->button) {
case MANUAL:
inc();
break;
case CLEAR:
dec();
break;
case LEFT:
leftComponent();
break;
case RIGHT:
rightComponent();
break;
default:
break;
}
}
void MenuSettingRGBA::dec()
@@ -173,9 +181,11 @@ unsigned short MenuSettingRGBA::getSelPart()
void MenuSettingRGBA::adjustInput()
{
#ifdef TARGET_GP2X
/*
gmenu2x->input.setInterval(30, ACTION_Y );
gmenu2x->input.setInterval(30, ACTION_X );
gmenu2x->input.setInterval(30, ACTION_L );
*/
#endif
}