[UP] + [DOWN] = default value

[UP] + [RIGHT] = max value
[LEFT] + [DOWN] = min value
If KILRAH defined in menus.cpp
This commit is contained in:
bsongis
2012-06-30 09:00:01 +00:00
parent c6f7ba0b55
commit 4505d886f6
+3 -3
View File
@@ -73,7 +73,7 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
{ {
int16_t newval = val; int16_t newval = val;
#if 1 #ifndef KILRAH
uint8_t kother = -1; uint8_t kother = -1;
#else #else
if (keyState(KEY_RIGHT) && keyState(KEY_LEFT)) { if (keyState(KEY_RIGHT) && keyState(KEY_LEFT)) {
@@ -92,7 +92,7 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
killEvents(KEY_DOWN); killEvents(KEY_DOWN);
} }
else if (s_editMode && keyState(KEY_UP) && keyState(KEY_DOWN)) { else if (s_editMode && keyState(KEY_UP) && keyState(KEY_DOWN)) {
newval = (i_min + i_max) / 2; newval = 0;
killEvents(KEY_UP); killEvents(KEY_UP);
killEvents(KEY_DOWN); killEvents(KEY_DOWN);
} }
@@ -110,7 +110,7 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
kother = KEY_RIGHT; kother = KEY_RIGHT;
} }
#if 1 #ifndef KILRAH
if ((kother != (uint8_t)-1) && keyState((EnumKeys)kother)) { if ((kother != (uint8_t)-1) && keyState((EnumKeys)kother)) {
newval = -val; newval = -val;
killEvents(KEY_RIGHT); killEvents(KEY_RIGHT);