Move mouse where it is clicked when touch controls are used
This commit is contained in:
parent
cf5f865a23
commit
c83c4553e1
|
@ -3,6 +3,7 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
||||||
|
#include "mouse.h"
|
||||||
#include "svga.h"
|
#include "svga.h"
|
||||||
|
|
||||||
namespace fallout {
|
namespace fallout {
|
||||||
|
@ -14,7 +15,7 @@ namespace fallout {
|
||||||
#define MAX_TOUCHES 10
|
#define MAX_TOUCHES 10
|
||||||
|
|
||||||
#define TAP_MAXIMUM_DURATION 75
|
#define TAP_MAXIMUM_DURATION 75
|
||||||
#define PAN_MINIMUM_MOVEMENT 4
|
#define PAN_MINIMUM_MOVEMENT 15
|
||||||
#define LONG_PRESS_MINIMUM_DURATION 500
|
#define LONG_PRESS_MINIMUM_DURATION 500
|
||||||
|
|
||||||
struct TouchLocation {
|
struct TouchLocation {
|
||||||
|
@ -271,6 +272,8 @@ void touch_process_gesture()
|
||||||
currentGesture.y = currentCentroid.y;
|
currentGesture.y = currentCentroid.y;
|
||||||
gestureEventsQueue.push(currentGesture);
|
gestureEventsQueue.push(currentGesture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_mouse_set_position(currentCentroid.x, currentCentroid.y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue