summaryrefslogtreecommitdiff
path: root/src/eventsmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-14 23:50:06 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-14 23:50:06 +0300
commit37a45b2e957dc645b6430bec4d955c35b46e07f3 (patch)
tree05847f64766091883e4072b73a64aff103d7d645 /src/eventsmanager.cpp
parent4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b (diff)
downloadmv-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.gz
mv-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.bz2
mv-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.xz
mv-37a45b2e957dc645b6430bec4d955c35b46e07f3.zip
Add logging for joystick add/remove events in SDL 2.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r--src/eventsmanager.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp
index fec747ccc..28b50ba2b 100644
--- a/src/eventsmanager.cpp
+++ b/src/eventsmanager.cpp
@@ -426,7 +426,14 @@ void EventsManager::logEvent(const SDL_Event &event)
event.button.x,
event.button.y);
break;
-
+ case SDL_JOYDEVICEADDED:
+ logger->log("event: SDL_JOYDEVICEADDED: %d",
+ event.jdevice.which);
+ break;
+ case SDL_JOYDEVICEREMOVED:
+ logger->log("event: SDL_JOYDEVICEREMOVED: %d",
+ event.jdevice.which);
+ break;
#else // USE_SDL2
case SDL_MOUSEMOTION: