From 47afda2549cdab0429047fcc64540a4ed5d0ede7 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Tue, 14 Jun 2016 11:55:32 +0200 Subject: [PATCH] Removed useless function: GetGestureDetected() Use instead: IsGestureDetected() --- src/gestures.c | 7 ------- src/gestures.h | 7 +++---- src/raylib.h | 7 +++---- 3 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/gestures.c b/src/gestures.c index 90371620..8e6005b3 100644 --- a/src/gestures.c +++ b/src/gestures.c @@ -298,13 +298,6 @@ bool IsGestureDetected(int gesture) else return false; } -// Check gesture type -int GetGestureDetected(void) -{ - // Get current gesture only if enabled - return (enabledGestures & currentGesture); -} - // Get number of touch points int GetTouchPointsCount(void) { diff --git a/src/gestures.h b/src/gestures.h index f2bdaba4..ab5287cc 100644 --- a/src/gestures.h +++ b/src/gestures.h @@ -90,13 +90,12 @@ extern "C" { // Prevents name mangling of functions //---------------------------------------------------------------------------------- // Module Functions Declaration //---------------------------------------------------------------------------------- +void SetGesturesEnabled(unsigned int gestureFlags); // Enable a set of gestures using flags +bool IsGestureDetected(int gesture); // Check if a gesture have been detected void ProcessGestureEvent(GestureEvent event); // Process gesture event and translate it into gestures void UpdateGestures(void); // Update gestures detected (must be called every frame) -bool IsGestureDetected(int gesture); // Check if a gesture have been detected -int GetGestureDetected(void); // Get latest detected gesture -void SetGesturesEnabled(unsigned int gestureFlags); // Enable a set of gestures using flags -int GetTouchPointsCount(void); // Get touch points count +int GetTouchPointsCount(void); // Get touch points count float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds Vector2 GetGestureDragVector(void); // Get gesture drag vector float GetGestureDragAngle(void); // Get gesture drag angle diff --git a/src/raylib.h b/src/raylib.h index bfcb9bf5..343e86f1 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -644,13 +644,12 @@ bool IsButtonReleased(int button); // Detect if an android //------------------------------------------------------------------------------------ // Gestures and Touch Handling Functions (Module: gestures) //------------------------------------------------------------------------------------ +void SetGesturesEnabled(unsigned int gestureFlags); // Enable a set of gestures using flags +bool IsGestureDetected(int gesture); // Check if a gesture have been detected void ProcessGestureEvent(GestureEvent event); // Process gesture event and translate it into gestures void UpdateGestures(void); // Update gestures detected (called automatically in PollInputEvents()) -bool IsGestureDetected(int gesture); // Check if a gesture have been detected -int GetGestureDetected(void); // Get latest detected gesture -void SetGesturesEnabled(unsigned int gestureFlags); // Enable a set of gestures using flags -int GetTouchPointsCount(void); // Get touch points count +int GetTouchPointsCount(void); // Get touch points count float GetGestureHoldDuration(void); // Get gesture hold time in milliseconds Vector2 GetGestureDragVector(void); // Get gesture drag vector float GetGestureDragAngle(void); // Get gesture drag angle