From d1153fc8c1f226d802e82cba7d11c686998a1523 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 25 Jan 2013 19:21:08 +0300 Subject: Add empty handlers for accelerometer events in Android version. --- src/client.cpp | 7 +++++++ src/gui/sdlinput.cpp | 5 +++++ src/inputmanager.cpp | 12 ++++++++++++ 3 files changed, 24 insertions(+) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 871b5c873..17a846b86 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -981,6 +981,9 @@ int Client::gameExec() case SDL_KEYBOARDSHOW: updateScreenKeyboard(event.user.code); break; + + case SDL_ACCELEROMETER: + break; #endif default: @@ -2883,6 +2886,10 @@ void Client::logEvent(const SDL_Event &event) case SDL_USEREVENT: logger->log("event: SDL_USEREVENT"); break; +#ifdef ANDROID + case SDL_ACCELEROMETER: + logger->log("event: SDL_ACCELEROMETER"); +#endif default: logger->log("event: other: %d", event.type); break; diff --git a/src/gui/sdlinput.cpp b/src/gui/sdlinput.cpp index 4f5234e73..bf8bd040f 100644 --- a/src/gui/sdlinput.cpp +++ b/src/gui/sdlinput.cpp @@ -164,6 +164,11 @@ void SDLInput::pushInput(const SDL_Event &event) break; } +#ifdef ANDROID + case SDL_ACCELEROMETER: + break; +#endif + case SDL_MOUSEBUTTONDOWN: mMouseDown = true; mouseInput.setX(event.button.x); diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index 38a743822..cd72f0ad5 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -487,6 +487,12 @@ bool InputManager::handleEvent(const SDL_Event &event) // joystick.handleDeActicateButton(event); break; } +#ifdef ANDROID + case SDL_ACCELEROMETER: + { + break; + } +#endif default: break; } @@ -522,6 +528,12 @@ bool InputManager::handleEvent(const SDL_Event &event) return true; } break; +#ifdef ANDROID + case SDL_ACCELEROMETER: + { + break; + } +#endif default: break; } -- cgit v1.2.3-70-g09d2