summaryrefslogtreecommitdiffhomepage
path: root/src/gestures.c
diff options
context:
space:
mode:
authorraysan5 <[email protected]>2015-04-22 18:36:52 +0200
committerraysan5 <[email protected]>2015-04-22 18:36:52 +0200
commit7db895ab5d415d931e0319061d437c952a6155b2 (patch)
tree2a869121e96cc4059fe979c5421893330003a026 /src/gestures.c
parentceb73257272e34a739b6225e1f30e4e377fdab77 (diff)
downloadraylib-7db895ab5d415d931e0319061d437c952a6155b2.tar.gz
raylib-7db895ab5d415d931e0319061d437c952a6155b2.zip
Corrected some bugs and warnings
Diffstat (limited to 'src/gestures.c')
-rw-r--r--src/gestures.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gestures.c b/src/gestures.c
index 594c3cd5..00b57e4c 100644
--- a/src/gestures.c
+++ b/src/gestures.c
@@ -30,7 +30,8 @@
#include <stdlib.h> // malloc(), free()
#include <stdio.h> // printf(), fprintf()
#include <math.h> // Used for ...
-#include <time.h>
+#include <time.h> // Used for clock functions
+#include <stdint.h> // Defines int32_t, int64_t
#if defined(PLATFORM_ANDROID)
#include <jni.h> // Java native interface
@@ -40,7 +41,7 @@
#if defined(PLATFORM_WEB)
#include <emscripten/emscripten.h>
- #include <emscripten/emscripten/html5.h>
+ #include <emscripten/html5.h>
#endif
//----------------------------------------------------------------------------------
@@ -78,7 +79,7 @@ typedef struct {
static GestureType gestureType = TYPE_MOTIONLESS;
// Gestures detection variables
-static int32_t touchId;
+//static int32_t touchId; // Not used...
// Event
static int64_t eventTime = 0;
@@ -616,13 +617,12 @@ static EM_BOOL EmscriptenInputCallback(int eventType, const EmscriptenTouchEvent
else if (eventType == EMSCRIPTEN_EVENT_TOUCHMOVE) gestureEvent.action = MOVE;
// Points
- gestureEvent.pointCount = event->numTouches;
+ gestureEvent.pointCount = touchEvent->numTouches;
// Position
gestureEvent.position[0] = (Vector2){ touchEvent->touches[0].canvasX, touchEvent->touches[0].canvasY };
gestureEvent.position[1] = (Vector2){ touchEvent->touches[1].canvasX, touchEvent->touches[1].canvasY };
-
ProcessMotionEvent(gestureEvent);
return 1;