[Horus] DBLKEYS implemented (same keys than the 9X)

This commit is contained in:
Bertrand Songis
2016-09-01 19:00:47 +02:00
parent 70846d4add
commit ed70813e5f
+5 -2
View File
@@ -106,11 +106,15 @@ void onSwitchLongEnterPress(const char *result)
checkIncDecSelection = SWSRC_INVERT;
}
#define DBLKEYS_PRESSED_RGT_LFT(in) ((in & ((1<<KEY_RIGHT) + (1<<KEY_LEFT))) == ((1<<KEY_RIGHT) + (1<<KEY_LEFT)))
#define DBLKEYS_PRESSED_UP_DWN(in) ((in & ((1<<KEY_UP) + (1<<KEY_DOWN))) == ((1<<KEY_UP) + (1<<KEY_DOWN)))
#define DBLKEYS_PRESSED_RGT_UP(in) ((in & ((1<<KEY_RIGHT) + (1<<KEY_UP))) == ((1<<KEY_RIGHT) + (1<<KEY_UP)))
#define DBLKEYS_PRESSED_LFT_DWN(in) ((in & ((1<<KEY_LEFT) + (1<<KEY_DOWN))) == ((1<<KEY_LEFT) + (1<<KEY_DOWN)))
int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_flags, IsValueAvailable isValueAvailable, const CheckIncDecStops &stops)
{
int newval = val;
#if 0
uint32_t in = KEYS_PRESSED();
if (!(i_flags & NO_DBLKEYS) && (EVT_KEY_MASK(event))) {
bool dblkey = true;
@@ -148,7 +152,6 @@ int checkIncDec(event_t event, int val, int i_min, int i_max, unsigned int i_fla
event = 0;
}
}
#endif
if (s_editMode>0 && event==EVT_ROTARY_RIGHT) {
newval += min<int>(rotencSpeed, i_max-val);