dinput: Keep a list of all IDirectInput objects and check it instead of refcount to create/destroy hook thread.
diff --git a/dlls/dinput/dinput_private.h b/dlls/dinput/dinput_private.h
index b29f61e..a5b74dc 100644
--- a/dlls/dinput/dinput_private.h
+++ b/dlls/dinput/dinput_private.h
@@ -34,6 +34,7 @@
     LONG                        ref;
 
     CRITICAL_SECTION            crit;
+    struct list                 entry;          /* entry into list of all IDirectInputs */
 
     DWORD                       evsequence;     /* unique sequence number for events */
     DWORD                       dwVersion;      /* direct input version number */