summaryrefslogtreecommitdiffhomepage
path: root/dinput/dinput.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2019-03-21 10:31:45 +0100
committerStanislaw Halik <sthalik@misaki.pl>2019-03-21 10:31:45 +0100
commit8553a64aa9eddfa9c7ed166ecb220f1a8c115b78 (patch)
tree970843c27d6079d71be15715adb984e375870e58 /dinput/dinput.hpp
parent89d5870138a4ad26c00cddb209ebe5312fe85dc3 (diff)
dinput: get rid of refcounting
Diffstat (limited to 'dinput/dinput.hpp')
-rw-r--r--dinput/dinput.hpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/dinput/dinput.hpp b/dinput/dinput.hpp
index 394084e2..e9908a94 100644
--- a/dinput/dinput.hpp
+++ b/dinput/dinput.hpp
@@ -25,23 +25,19 @@ using diptr = IDirectInput8A*;
class OTR_DINPUT_EXPORT di_t final
{
- static void unref_di();
- static void ref_di();
-
static diptr handle;
- static int refcnt;
static QMutex lock;
static diptr init_di_();
+ static diptr init_di();
public:
di_t();
- ~di_t();
di_t(const di_t&) : di_t() {}
di_t& operator=(const di_t&) = default;
- diptr operator->() const { return handle; }
- operator bool() const { return handle != nullptr; }
- operator diptr() const { return handle; }
+ diptr operator->() const;
+ operator bool() const;
+ operator diptr() const;
static bool poll_device(LPDIRECTINPUTDEVICE8 dev);
};