summaryrefslogtreecommitdiff
path: root/src/ui/touch.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-07 08:15:57 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-07 08:15:57 +0200
commit4562609999fb880f66ee0eccef409d69a64a4ce0 (patch)
tree8fcdc34cbde9e837136f29259da4cdde7884bd5d /src/ui/touch.c
parent5b80af0e983db5e3d09e207c9fce6790b53dea4d (diff)
iOS: Haptic tap when long-pressing
Diffstat (limited to 'src/ui/touch.c')
-rw-r--r--src/ui/touch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ui/touch.c b/src/ui/touch.c
index f15eda6f..136457a5 100644
--- a/src/ui/touch.c
+++ b/src/ui/touch.c
@@ -28,6 +28,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
28#include <the_Foundation/math.h> 28#include <the_Foundation/math.h>
29#include <SDL_timer.h> 29#include <SDL_timer.h>
30 30
31#if defined (iPlatformAppleMobile)
32# include "../ios.h"
33#endif
34
31iDeclareType(Touch) 35iDeclareType(Touch)
32iDeclareType(TouchState) 36iDeclareType(TouchState)
33iDeclareType(Momentum) 37iDeclareType(Momentum)
@@ -174,6 +178,9 @@ static void update_TouchState_(void *ptr) {
174 touch->isTapAndHold = iTrue; 178 touch->isTapAndHold = iTrue;
175 touch->hasMoved = iFalse; 179 touch->hasMoved = iFalse;
176 touch->startPos = touch->pos[0]; 180 touch->startPos = touch->pos[0];
181#if defined (iPlatformAppleMobile)
182 playHapticEffect_iOS(tap_HapticEffect);
183#endif
177 } 184 }
178 } 185 }
179 } 186 }