mirror of
https://git.planet-casio.com/Lephenixnoir/gint.git
synced 2025-06-06 11:05:05 +02:00
Compare commits
2 commits
bc8b9863ae
...
696b0ca9c0
Author | SHA1 | Date | |
---|---|---|---|
|
696b0ca9c0 | ||
|
46f1fb99d9 |
2 changed files with 8 additions and 6 deletions
|
@ -151,9 +151,9 @@ enum
|
||||||
KEYEV_UP = 2, /* Key was released */
|
KEYEV_UP = 2, /* Key was released */
|
||||||
KEYEV_HOLD = 3, /* A key that was pressed has been held down */
|
KEYEV_HOLD = 3, /* A key that was pressed has been held down */
|
||||||
KEYEV_OSMENU = 4, /* We went to the main menu and back */
|
KEYEV_OSMENU = 4, /* We went to the main menu and back */
|
||||||
KEYEV_TOUCH_PRESSED = 5, /* Touch was detected */
|
KEYEV_TOUCH_DOWN = 5, /* Touch was detected */
|
||||||
KEYEV_TOUCH_DRAG = 6, /* A touch that was detected has been held down */
|
KEYEV_TOUCH_DRAG = 6, /* A touch that was detected has been held down */
|
||||||
KEYEV_TOUCH_RELEASE = 7, /* Touch was released */
|
KEYEV_TOUCH_UP = 7, /* Touch was released */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Keyboard frequency analysis is a runtime setting since gint 2.4. This macro
|
/* Keyboard frequency analysis is a runtime setting since gint 2.4. This macro
|
||||||
|
|
|
@ -190,12 +190,14 @@ static key_event_t make_event(struct _touch_addots const *dots)
|
||||||
|
|
||||||
// TODO: Handle dual touch here
|
// TODO: Handle dual touch here
|
||||||
if(dots->touches != 1) {
|
if(dots->touches != 1) {
|
||||||
if(prev_type != KEYEV_TOUCH_RELEASE && prev_type != KEYEV_NONE)
|
if(prev_type != KEYEV_TOUCH_UP && prev_type != KEYEV_NONE)
|
||||||
evt.type = KEYEV_TOUCH_RELEASE;
|
evt.type = KEYEV_TOUCH_UP;
|
||||||
|
evt.x = prev_x;
|
||||||
|
evt.y = prev_y;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(prev_type == KEYEV_TOUCH_RELEASE || prev_type == KEYEV_NONE)
|
if(prev_type == KEYEV_TOUCH_UP || prev_type == KEYEV_NONE)
|
||||||
evt.type = KEYEV_TOUCH_PRESSED;
|
evt.type = KEYEV_TOUCH_DOWN;
|
||||||
/* Don't emit successive DRAG events at the same location */
|
/* Don't emit successive DRAG events at the same location */
|
||||||
else if(dots->x1 != prev_x || dots->y1 != prev_y)
|
else if(dots->x1 != prev_x || dots->y1 != prev_y)
|
||||||
evt.type = KEYEV_TOUCH_DRAG;
|
evt.type = KEYEV_TOUCH_DRAG;
|
||||||
|
|
Loading…
Add table
Reference in a new issue