summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-15 04:18:54 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-15 04:19:24 +0300
commitb51f40475dcdf4282eccd3aba9e4e5db034e412f (patch)
treeaf3029a643f8fbd4ae4a032ed7f5c8c05e0edad6
parentb8609879ee683da6a6cc15222b7d0d7f075095db (diff)
downloadmv-b51f40475dcdf4282eccd3aba9e4e5db034e412f.tar.gz
mv-b51f40475dcdf4282eccd3aba9e4e5db034e412f.tar.bz2
mv-b51f40475dcdf4282eccd3aba9e4e5db034e412f.tar.xz
mv-b51f40475dcdf4282eccd3aba9e4e5db034e412f.zip
Improve input logging in SDL 1.2
-rw-r--r--src/eventsmanager.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index 5bc9035f4..41f2a8f3e 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -441,12 +441,20 @@ void EventsManager::logEvent(const SDL_Event &event)
event.motion.state, event.motion.x, event.motion.y);
break;
case SDL_KEYDOWN:
- logger->log("event: SDL_KEYDOWN: %d,%d,%d", event.key.state,
- event.key.keysym.scancode, event.key.keysym.unicode);
+ logger->log("event: SDL_KEYDOWN: %s(%d),%d,%d,%d",
+ SDL_GetKeyName(event.key.keysym.sym),
+ event.key.keysym.sym,
+ event.key.keysym.scancode,
+ event.key.state,
+ event.key.keysym.unicode);
break;
case SDL_KEYUP:
- logger->log("event: SDL_KEYUP: %d,%d,%d", event.key.state,
- event.key.keysym.scancode, event.key.keysym.unicode);
+ logger->log("event: SDL_KEYUP: %s(%d),%d,%d,%d",
+ SDL_GetKeyName(event.key.keysym.sym),
+ event.key.keysym.sym,
+ event.key.keysym.scancode,
+ event.key.state,
+ event.key.keysym.unicode);
break;
case SDL_VIDEORESIZE:
logger->log("event: SDL_VIDEORESIZE");