aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/core_gestures_detection.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/examples/core_gestures_detection.c b/examples/core_gestures_detection.c
index a5cf8e69..63a1e6bd 100644
--- a/examples/core_gestures_detection.c
+++ b/examples/core_gestures_detection.c
@@ -43,12 +43,11 @@ int main()
// Update
//----------------------------------------------------------------------------------
lastGesture = currentGesture;
+ currentGesture = GetGestureDetected();
touchPosition = GetTouchPosition(0);
-
- if (CheckCollisionPointRec(touchPosition, touchArea) && IsGestureDetected())
+
+ if (CheckCollisionPointRec(touchPosition, touchArea) && (currentGesture != GESTURE_NONE))
{
- currentGesture = GetGestureType();
-
if (currentGesture != lastGesture)
{
// Store gesture string
@@ -78,7 +77,6 @@ int main()
}
}
}
- else currentGesture = GESTURE_NONE;
//----------------------------------------------------------------------------------
// Draw