summaryrefslogtreecommitdiffhomepage
path: root/dinput/dinput.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:11:49 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-02-09 12:13:39 +0100
commit14a976e4729d38f86d336fa6054279b33905b63c (patch)
tree41e5a48f3e75520800fe3937691af0755c565d64 /dinput/dinput.hpp
parent6073e15f2871f2699f3e821dc927b3c49187cfb9 (diff)
dinput: fix api usage
Issue: #871 - don't sleep with a lock held - fix Acquire() return value check - remove needless Unacquire() calls - always use Poll(), even for keyboard - fix HRESULT debug output
Diffstat (limited to 'dinput/dinput.hpp')
-rw-r--r--dinput/dinput.hpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/dinput/dinput.hpp b/dinput/dinput.hpp
index 9dbc576c..394084e2 100644
--- a/dinput/dinput.hpp
+++ b/dinput/dinput.hpp
@@ -17,6 +17,10 @@
#include <dinput.h>
+// XXX TODO -sh 20190209
+// keybinding_worker and joystick context are badly named
+// add namespaces and rename, including inner joystick device struct
+
using diptr = IDirectInput8A*;
class OTR_DINPUT_EXPORT di_t final
@@ -38,4 +42,6 @@ public:
diptr operator->() const { return handle; }
operator bool() const { return handle != nullptr; }
operator diptr() const { return handle; }
+
+ static bool poll_device(LPDIRECTINPUTDEVICE8 dev);
};