Skip to content

Instantly share code, notes, and snippets.

@Squall-Leonhart
Created May 12, 2017 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Squall-Leonhart/40eb4380d097fc9672df75ffa1f4d1d1 to your computer and use it in GitHub Desktop.
Save Squall-Leonhart/40eb4380d097fc9672df75ffa1f4d1d1 to your computer and use it in GitHub Desktop.
Index: Source/nragev20/DirectInput.cpp
===================================================================
diff --git a/trunk/Source/nragev20/DirectInput.cpp b/trunk/Source/nragev20/DirectInput.cpp
--- a/trunk/Source/nragev20/DirectInput.cpp (revision 4578)
+++ b/trunk/Source/nragev20/DirectInput.cpp (working copy)
@@ -678,8 +678,17 @@
// EnumMakeDeviceList has been rewritten. --rabid
BOOL CALLBACK EnumMakeDeviceList( LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef )
{
- if( IsXInputDevice( &lpddi->guidProduct ) ) // Check if is XInput device --tecnicors
- return DIENUM_CONTINUE;
+ switch (GET_DIDEVICE_TYPE(lpddi->dwDevType)) {
+ case DI8DEVTYPE_JOYSTICK:
+ case DI8DEVTYPE_GAMEPAD:
+ case DI8DEVTYPE_FLIGHT:
+ case DI8DEVTYPE_DRIVING:
+ if (IsXInputDevice(&lpddi->guidProduct)) // Check if is XInput device --tecnicors
+ return DIENUM_CONTINUE;
+ break;
+ default:
+ break;
+ }
if (IsEqualGUID(g_sysMouse.guidInstance, lpddi->guidInstance))
return DIENUM_CONTINUE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment