diff options
Diffstat (limited to 'dinput')
-rw-r--r-- | dinput/keybinding-worker.cpp | 2 | ||||
-rw-r--r-- | dinput/win32-joystick.hpp | 17 |
2 files changed, 4 insertions, 15 deletions
diff --git a/dinput/keybinding-worker.cpp b/dinput/keybinding-worker.cpp index c7547107..9c2b06d4 100644 --- a/dinput/keybinding-worker.cpp +++ b/dinput/keybinding-worker.cpp @@ -16,7 +16,7 @@ #include <windows.h> -Key::Key() {} +Key::Key() = default; bool Key::should_process() { 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 |