diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-11 09:58:14 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-11 09:58:14 +0200 |
commit | 939c0f48181046d6b938be0f5ef327a4d991e433 (patch) | |
tree | 6ef76a1a84a50537a2dcbbba3bb3d47bf6d82e5c /src/ui | |
parent | a132cb7c04a39dc81f998ec3364fbaae87927016 (diff) |
Mobile: Adjustments and fixes for iOS
Diffstat (limited to 'src/ui')
-rw-r--r-- | src/ui/touch.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c index ea7b6648..df457b27 100644 --- a/src/ui/touch.c +++ b/src/ui/touch.c | |||
@@ -492,7 +492,7 @@ iBool processEvent_Touch(const SDL_Event *ev) { | |||
492 | const size_t lastIndex = iMin(touch->posCount - 1, lastIndex_Touch_); | 492 | const size_t lastIndex = iMin(touch->posCount - 1, lastIndex_Touch_); |
493 | const uint32_t elapsed = fing->timestamp - touch->posTime[lastIndex]; | 493 | const uint32_t elapsed = fing->timestamp - touch->posTime[lastIndex]; |
494 | const float minVelocity = 400.0f; | 494 | const float minVelocity = 400.0f; |
495 | if (elapsed < 85) { | 495 | if (elapsed < 150) { |
496 | velocity = divf_F3(sub_F3(pos, touch->pos[lastIndex]), | 496 | velocity = divf_F3(sub_F3(pos, touch->pos[lastIndex]), |
497 | (float) elapsed / 1000.0f); | 497 | (float) elapsed / 1000.0f); |
498 | if (touch->axis == y_TouchAxis || fabsf(x_F3(velocity)) < minVelocity) { | 498 | if (touch->axis == y_TouchAxis || fabsf(x_F3(velocity)) < minVelocity) { |
@@ -502,7 +502,7 @@ iBool processEvent_Touch(const SDL_Event *ev) { | |||
502 | setY_F3(&velocity, 0.0f); | 502 | setY_F3(&velocity, 0.0f); |
503 | } | 503 | } |
504 | } | 504 | } |
505 | // printf("elap:%ums vel:%f\n", elapsed, length_F3(velocity)); | 505 | //printf("elap:%ums vel:%f\n", elapsed, length_F3(velocity)); |
506 | pushPos_Touch_(touch, pos, nowTime); | 506 | pushPos_Touch_(touch, pos, nowTime); |
507 | /* If short and didn't move far, do a tap (left click). */ | 507 | /* If short and didn't move far, do a tap (left click). */ |
508 | if (duration < longPressSpanMs_ && isStationary_Touch_(touch)) { | 508 | if (duration < longPressSpanMs_ && isStationary_Touch_(touch)) { |