summaryrefslogtreecommitdiffhomepage
path: root/opentrack/win32-joystick.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack/win32-joystick.hpp')
-rw-r--r--opentrack/win32-joystick.hpp17
1 files changed, 3 insertions, 14 deletions
diff --git a/opentrack/win32-joystick.hpp b/opentrack/win32-joystick.hpp
index df00aee7..6d5e1074 100644
--- a/opentrack/win32-joystick.hpp
+++ b/opentrack/win32-joystick.hpp
@@ -24,7 +24,7 @@ namespace std {
template<>
struct hash<QString>
{
- std::size_t operator()(const QString& value) const
+ inline std::size_t operator()(const QString& value) const
{
return qHash(value);
}
@@ -78,19 +78,8 @@ private:
Timer first_timer;
DIJOYSTATE2 js_old;
- joy(LPDIRECTINPUTDEVICE8 handle, const QString& guid, const QString& name)
- : joy_handle(handle), guid(guid), name(name)
- {
- qDebug() << "got joy" << guid;
- for (int i = 0; i < 128; i++)
- pressed[i] = false;
- }
-
- ~joy()
- {
- qDebug() << "nix joy" << guid;
- release();
- }
+ joy(LPDIRECTINPUTDEVICE8 handle, const QString& guid, const QString& name);
+ ~joy();
void release();
bool poll(fn f);