|
|
@@ -167,7 +167,7 @@ namespace Polycode {
|
|
|
dispatchEvent(evt, InputEvent::EVENT_MOUSEUP);
|
|
|
mouseButtons[mouseButton] = state;
|
|
|
|
|
|
- if(simulateTouchWithMouse && mouseButton == MOUSE_BUTTON1) {
|
|
|
+ if(simulateTouchWithMouse) {
|
|
|
TouchInfo touch;
|
|
|
touch.position = mousePosition;
|
|
|
touch.id = 0;
|
|
|
@@ -198,13 +198,20 @@ namespace Polycode {
|
|
|
InputEvent *evt = new InputEvent(mousePosition, ticks);
|
|
|
dispatchEvent(evt, InputEvent::EVENT_MOUSEMOVE);
|
|
|
|
|
|
- if(simulateTouchWithMouse && mouseButtons[MOUSE_BUTTON1]) {
|
|
|
+ if(simulateTouchWithMouse) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
TouchInfo touch;
|
|
|
touch.position = mousePosition;
|
|
|
touch.id = 0;
|
|
|
std::vector<TouchInfo> touches;
|
|
|
touches.push_back(touch);
|
|
|
-
|
|
|
+
|
|
|
+ if(!mouseButtons[MOUSE_BUTTON1]) {
|
|
|
+ mouseButtons[MOUSE_BUTTON1] = true;
|
|
|
+ touchesBegan(touch, touches, ticks);
|
|
|
+ }
|
|
|
touchesMoved(touch, touches, ticks);
|
|
|
}
|
|
|
}
|