diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2016-03-04 02:35:02 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2016-03-04 03:07:43 +0300 |
commit | 0f8053351bdf870962e1b7cbb9072806935b84bf (patch) | |
tree | b8b09e8e282a2fcca924d04092975770ce50f917 /3rdparty/xinputcheck-src | |
parent | e174f8de045120e2a8c3b42f47afc17c841974ab (diff) |
XInputCheck: add XInputCheck_ClearDeviceCache().
Diffstat (limited to '3rdparty/xinputcheck-src')
-rw-r--r-- | 3rdparty/xinputcheck-src/xinputcheck.cpp | 6 | ||||
-rw-r--r-- | 3rdparty/xinputcheck-src/xinputcheck.h | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/3rdparty/xinputcheck-src/xinputcheck.cpp b/3rdparty/xinputcheck-src/xinputcheck.cpp index b25bd070c..147c7cbce 100644 --- a/3rdparty/xinputcheck-src/xinputcheck.cpp +++ b/3rdparty/xinputcheck-src/xinputcheck.cpp @@ -111,3 +111,9 @@ SDL_IsXInputDevice(const GUID* pGuidProductFromDirectInput) bool XInputCheck_IsGuidProductXInputDevice(const GUID *pGuidProductFromDirectInput) { return SDL_IsXInputDevice(pGuidProductFromDirectInput); } + +void XInputCheck_ClearDeviceCache() { + SDL_free(SDL_RawDevList); + SDL_RawDevList = NULL; + SDL_RawDevListCount = 0; +} diff --git a/3rdparty/xinputcheck-src/xinputcheck.h b/3rdparty/xinputcheck-src/xinputcheck.h index 4a90319fe..909a401e0 100644 --- a/3rdparty/xinputcheck-src/xinputcheck.h +++ b/3rdparty/xinputcheck-src/xinputcheck.h @@ -26,4 +26,9 @@ bool XInputCheck_IsGuidProductXInputDevice(const GUID *pGuidProductFromDirectInput); +/// XInputCheck_ClearDeviceCache clears XInputCheck's internal device cache. +/// Calling this function causes the next call to +/// XInputCheck_IsGuidProductXInputDevice to query the system's device tree. +void XInputCheck_ClearDeviceCache(); + #endif |