From 12759ce1aa4327e44632a356d81c2f0465571d8a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 12 Sep 2017 17:41:56 +0300 Subject: Extend SDL events logging. --- src/utils/x11logger.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/utils/x11logger.cpp') diff --git a/src/utils/x11logger.cpp b/src/utils/x11logger.cpp index a61a940b7..dfccdd0bb 100644 --- a/src/utils/x11logger.cpp +++ b/src/utils/x11logger.cpp @@ -18,7 +18,6 @@ * along with this program. If not, see . */ -#ifdef USE_SDL2 #ifdef USE_X11 #include "utils/x11logger.h" @@ -46,7 +45,13 @@ bool X11Logger::logEvent(const SDL_Event &event) return false; std::string typeStr; +#ifdef USE_SDL2 const int type = event.syswm.msg->msg.x11.event.type; +#else // USE_SDL2 + + const int type = event.syswm.msg->event.xevent.type; +#endif // USE_SDL2 + switch (type) { logType(2, "KeyPress"); @@ -94,4 +99,3 @@ bool X11Logger::logEvent(const SDL_Event &event) } #endif // USE_X11 -#endif // USE_SDL2 -- cgit v1.2.3-70-g09d2