summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-12 17:41:56 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-12 17:41:56 +0300
commit12759ce1aa4327e44632a356d81c2f0465571d8a (patch)
tree7145ecd7bb3d00afe4549e512afba62a50ff0fdb /src/utils
parentde11a42a6fee8575cc035c84636277f387299f36 (diff)
downloadplus-12759ce1aa4327e44632a356d81c2f0465571d8a.tar.gz
plus-12759ce1aa4327e44632a356d81c2f0465571d8a.tar.bz2
plus-12759ce1aa4327e44632a356d81c2f0465571d8a.tar.xz
plus-12759ce1aa4327e44632a356d81c2f0465571d8a.zip
Extend SDL events logging.
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/x11logger.cpp8
-rw-r--r--src/utils/x11logger.h2
2 files changed, 6 insertions, 4 deletions
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 <http://www.gnu.org/licenses/>.
*/
-#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
diff --git a/src/utils/x11logger.h b/src/utils/x11logger.h
index e7307ce51..6ba01e579 100644
--- a/src/utils/x11logger.h
+++ b/src/utils/x11logger.h
@@ -21,7 +21,6 @@
#ifndef UTILS_X11LOGGER_H
#define UTILS_X11LOGGER_H
-#ifdef USE_SDL2
#ifdef USE_X11
#include "localconsts.h"
@@ -34,5 +33,4 @@ namespace X11Logger
} // namespace X11Logger
#endif // USE_X11
-#endif // USE_SDL2
#endif // UTILS_X11LOGGER_H