summaryrefslogtreecommitdiff
path: root/src/gui/sdlinput.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/sdlinput.cpp')
-rw-r--r--src/gui/sdlinput.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp
index 59f9c8e19..a942d6909 100644
--- a/src/gui/sdlinput.cpp
+++ b/src/gui/sdlinput.cpp
@@ -185,17 +185,23 @@ void SDLInput::pushInput(const SDL_Event &event)
#endif
#ifdef ANDROID
+#ifndef USE_SDL2
case SDL_ACCELEROMETER:
break;
#endif
+#endif
case SDL_MOUSEBUTTONDOWN:
mMouseDown = true;
mouseInput.setX(event.button.x);
mouseInput.setY(event.button.y);
#ifdef ANDROID
+#ifdef USE_SDL2
+ mouseInput.setReal(event.button.x, event.button.y);
+#else
mouseInput.setReal(event.button.realx, event.button.realy);
#endif
+#endif
mouseInput.setButton(convertMouseButton(event.button.button));
#ifndef USE_SDL2
@@ -215,8 +221,12 @@ void SDLInput::pushInput(const SDL_Event &event)
mouseInput.setX(event.button.x);
mouseInput.setY(event.button.y);
#ifdef ANDROID
+#ifdef USE_SDL2
+ mouseInput.setReal(event.button.x, event.button.y);
+#else
mouseInput.setReal(event.button.realx, event.button.realy);
#endif
+#endif
mouseInput.setButton(convertMouseButton(event.button.button));
mouseInput.setType(gcn::MouseInput::RELEASED);
mouseInput.setTimeStamp(SDL_GetTicks());
@@ -227,8 +237,12 @@ void SDLInput::pushInput(const SDL_Event &event)
mouseInput.setX(event.motion.x);
mouseInput.setY(event.motion.y);
#ifdef ANDROID
+#ifdef USE_SDL2
+ mouseInput.setReal(event.motion.x, event.motion.y);
+#else
mouseInput.setReal(event.motion.realx, event.motion.realy);
#endif
+#endif
mouseInput.setButton(gcn::MouseInput::EMPTY);
mouseInput.setType(gcn::MouseInput::MOVED);
mouseInput.setTimeStamp(SDL_GetTicks());