Fixed some Gesture bugs
This commit is contained in:
parent
2a8820a2a9
commit
a4c4851398
6 changed files with 18 additions and 14 deletions
|
@ -27,7 +27,7 @@
|
|||
#include "SDL_gesture_c.h"
|
||||
|
||||
//TODO: Replace with malloc
|
||||
#define MAXFINGERS 3
|
||||
#define MAXFINGERS 5
|
||||
#define MAXTOUCHES 2
|
||||
#define MAXTEMPLATES 4
|
||||
#define MAXPATHSIZE 1024
|
||||
|
@ -496,6 +496,7 @@ void SDL_GestureProcessEvent(SDL_Event* event)
|
|||
}
|
||||
}
|
||||
inTouch->gestureLast[j] = inTouch->gestureLast[inTouch->numDownFingers];
|
||||
j = -1;
|
||||
break;
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -392,8 +392,7 @@ SDL_SendTouchMotion(SDL_TouchID id, SDL_FingerID fingerid, int relative,
|
|||
//scale to Integer coordinates
|
||||
Uint16 x = (xin+touch->x_min)*(touch->xres)/(touch->native_xres);
|
||||
Uint16 y = (yin+touch->y_min)*(touch->yres)/(touch->native_yres);
|
||||
Uint16 pressure = (yin+touch->pressure_min)*(touch->pressureres)/(touch->native_pressureres);
|
||||
printf("(%f,%f) --> (%i,%i)\n",xin,yin,x,y);
|
||||
Uint16 pressure = (yin+touch->pressure_min)*(touch->pressureres)/(touch->native_pressureres);
|
||||
if(touch->flush_motion) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue