From 45fc7dfe871e25c913deb56063ca930dafe8b9ae Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 21 Sep 2013 21:46:17 +0300 Subject: fix compilation and partial running with SDL2 on Android. --- src/gui/sdlinput.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/gui/sdlinput.cpp') 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,8 +185,10 @@ void SDLInput::pushInput(const SDL_Event &event) #endif #ifdef ANDROID +#ifndef USE_SDL2 case SDL_ACCELEROMETER: break; +#endif #endif case SDL_MOUSEBUTTONDOWN: @@ -194,7 +196,11 @@ 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)); @@ -215,7 +221,11 @@ 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); @@ -227,7 +237,11 @@ 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); -- cgit v1.2.3-60-g2f50