summaryrefslogtreecommitdiff
path: root/src/input/inputmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-10-07 23:21:38 +0300
committerAndrei Karas <akaras@inbox.ru>2013-10-07 23:22:37 +0300
commitdfdd2555a2816af800c2e999bf45de9d8bd884a8 (patch)
tree553bfedc80e6fd0e10461e900e0de03948c4d06a /src/input/inputmanager.cpp
parent4776e0efe9859d623939ffd48b95d9ca5fb8969a (diff)
downloadmanaverse-dfdd2555a2816af800c2e999bf45de9d8bd884a8.tar.gz
manaverse-dfdd2555a2816af800c2e999bf45de9d8bd884a8.tar.bz2
manaverse-dfdd2555a2816af800c2e999bf45de9d8bd884a8.tar.xz
manaverse-dfdd2555a2816af800c2e999bf45de9d8bd884a8.zip
emulate right click with SDL2 by multitouch two fingers click.
Diffstat (limited to 'src/input/inputmanager.cpp')
-rw-r--r--src/input/inputmanager.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp
index af6759b0f..e395aad8e 100644
--- a/src/input/inputmanager.cpp
+++ b/src/input/inputmanager.cpp
@@ -30,6 +30,7 @@
#include "input/joystick.h"
#include "input/keyboardconfig.h"
#include "input/keyboarddata.h"
+#include "input/multitouchmanager.h"
#include "gui/gui.h"
#include "gui/sdlinput.h"
@@ -565,8 +566,15 @@ bool InputManager::handleEvent(const SDL_Event &event)
// joystick.handleDeActicateButton(event);
break;
}
+#ifdef USE_SDL2
+ case SDL_FINGERDOWN:
+ multiTouchManager.handleFingerDown(event);
+ break;
+ case SDL_FINGERUP:
+ multiTouchManager.handleFingerUp(event);
+ break;
+#else
#ifdef ANDROID
-#ifndef USE_SDL2
case SDL_ACCELEROMETER:
{
break;