summaryrefslogtreecommitdiffhomepage
path: root/dinput/win32-joystick.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-07-08 23:20:56 +0200
commit90940a774eab876c38d5cef981b4be5bae67a462 (patch)
tree2e60edc1719ffd53752a55a7f0444166965e90c5 /dinput/win32-joystick.hpp
parente3292e1ddaa8d69eb320d2700fc582b4675cf8ce (diff)
modernize only
Diffstat (limited to 'dinput/win32-joystick.hpp')
-rw-r--r--dinput/win32-joystick.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp
index a6a4edc9..757a9706 100644
--- a/dinput/win32-joystick.hpp
+++ b/dinput/win32-joystick.hpp
@@ -7,34 +7,24 @@
*/
#pragma once
-#ifdef _WIN32
-
#include "dinput.hpp"
#include "compat/timer.hpp"
+#include "compat/qhash.hpp"
#include "export.hpp"
+
#include <cstring>
#include <memory>
#include <vector>
#include <functional>
#include <algorithm>
#include <unordered_map>
+
#include <QString>
#include <QDebug>
#include <QMutex>
#include <QMutexLocker>
#include <QWidget>
-namespace std {
-template<>
-struct hash<QString>
-{
- inline std::size_t operator()(const QString& value) const
- {
- return qHash(value);
- }
-};
-}
-
struct OTR_DINPUT_EXPORT win32_joy_ctx final
{
using fn = std::function<void(const QString& guid, int btn, bool held)>;
@@ -102,4 +92,3 @@ private:
static enum_state enumerator;
};
-#endif