summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-09-22 19:03:06 +0300
committerAndrei Karas <akaras@inbox.ru>2013-09-22 19:03:06 +0300
commit8c45b61379b81574be6dd36f149f1b84e21648c5 (patch)
treef6563fba83d564e98de6ec76b5a6fa677ec4d850
parentfbad53d1a8cc89d07227165042cd55e7ed9c5dd2 (diff)
downloadmv-8c45b61379b81574be6dd36f149f1b84e21648c5.tar.gz
mv-8c45b61379b81574be6dd36f149f1b84e21648c5.tar.bz2
mv-8c45b61379b81574be6dd36f149f1b84e21648c5.tar.xz
mv-8c45b61379b81574be6dd36f149f1b84e21648c5.zip
add additional event for loggins with SDL2.
-rw-r--r--src/client.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 3a5a3f943..0b913c601 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2926,6 +2926,30 @@ void Client::logEvent(const SDL_Event &event)
str = name2; \
break
+ case SDL_FINGERDOWN:
+ {
+ const SDL_TouchFingerEvent &touch = event.tfinger;
+ logger->log("event: SDL_FINGERDOWN: %lld,%lld (%f,%f) (%f,%f)",
+ touch.touchId, touch.fingerId, touch.x, touch.y,
+ touch.dx, touch.dy);
+ break;
+ }
+ case SDL_FINGERUP:
+ {
+ const SDL_TouchFingerEvent &touch = event.tfinger;
+ logger->log("event: SDL_FINGERUP: %lld,%lld (%f,%f) (%f,%f)",
+ touch.touchId, touch.fingerId, touch.x, touch.y,
+ touch.dx, touch.dy);
+ break;
+ }
+ case SDL_FINGERMOTION:
+ {
+ const SDL_TouchFingerEvent &touch = event.tfinger;
+ logger->log("event: SDL_FINGERMOTION: %lld,%lld (%f,%f) (%f,%f)",
+ touch.touchId, touch.fingerId, touch.x, touch.y,
+ touch.dx, touch.dy);
+ break;
+ }
case SDL_KEYDOWN:
logger->log("event: SDL_KEYDOWN: %d,%d", event.key.state,
event.key.keysym.scancode);
@@ -2975,6 +2999,21 @@ void Client::logEvent(const SDL_Event &event)
case SDL_TEXTINPUT:
logger->log("event: SDL_TEXTINPUT: %s", event.text.text);
break;
+ case SDL_APP_TERMINATING:
+ logger->log("SDL_APP_TERMINATING");
+ break;
+ case SDL_APP_LOWMEMORY:
+ logger->log("SDL_APP_LOWMEMORY");
+ break;
+ case SDL_APP_WILLENTERBACKGROUND:
+ logger->log("SDL_APP_WILLENTERBACKGROUND");
+ break;
+ case SDL_APP_WILLENTERFOREGROUND:
+ logger->log("SDL_APP_WILLENTERFOREGROUND");
+ break;
+ case SDL_APP_DIDENTERFOREGROUND:
+ logger->log("SDL_APP_DIDENTERFOREGROUND");
+ break;
#else
case SDL_KEYDOWN:
logger->log("event: SDL_KEYDOWN: %d,%d,%d", event.key.state,