summaryrefslogtreecommitdiffhomepage
path: root/opentrack-dinput/dinput.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'opentrack-dinput/dinput.hpp')
-rw-r--r--opentrack-dinput/dinput.hpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/opentrack-dinput/dinput.hpp b/opentrack-dinput/dinput.hpp
index 37a6d723..53f1c4af 100644
--- a/opentrack-dinput/dinput.hpp
+++ b/opentrack-dinput/dinput.hpp
@@ -35,16 +35,19 @@ public:
{
friend class dinput_handle;
- LPDIRECTINPUT8& handle;
+ LPDIRECTINPUT8* handle;
di_t(LPDIRECTINPUT8& handle);
void free_di();
+ void unref_di();
+ void ref_di();
public:
- LPDIRECTINPUT8 operator->() { return handle; }
- operator LPDIRECTINPUT8() { return handle; }
- LPDIRECTINPUT8 di() { return handle; }
-
+ LPDIRECTINPUT8 operator->() { return *handle; }
+ operator LPDIRECTINPUT8() { return *handle; }
+ LPDIRECTINPUT8 di() { return *handle; }
+ di_t& operator=(const di_t& new_di);
+ di_t();
~di_t();
};