From 0111e2707146a50a467b40b806cc10c498ea1d90 Mon Sep 17 00:00:00 2001 From: ManiacDC Date: Mon, 15 May 2017 08:32:21 -0400 Subject: [PATCH 1/3] Fix for slow DirectInput enumerations. Eliminates enumerations on generic DI8DEVTYPE_DEVICE and only checks to see if a devices is an XInputDevice for DI8DEVTYPE_GAMEPAD, DI8DEVTYPE_DRIVING, DI8DEVTYPE_JOYSTICK, and DI8DEVTYPE_FLIGHT. --- Source/nragev20/DirectInput.cpp | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/Source/nragev20/DirectInput.cpp b/Source/nragev20/DirectInput.cpp index d7551c40e..faad248ff 100644 --- a/Source/nragev20/DirectInput.cpp +++ b/Source/nragev20/DirectInput.cpp @@ -678,8 +678,23 @@ BOOL CALLBACK EnumGetEffectTypes( LPCDIEFFECTINFO pdei, LPVOID pvRef ) // 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)) { + // we don't need to do anything with these generic devices + case DI8DEVTYPE_DEVICE: + return DIENUM_CONTINUE; + break; + // these are potential xinput controllers, check them + case DI8DEVTYPE_GAMEPAD: + case DI8DEVTYPE_DRIVING: + case DI8DEVTYPE_JOYSTICK: + case DI8DEVTYPE_FLIGHT: + if (IsXInputDevice(&lpddi->guidProduct)) // Check if is XInput device --tecnicors + return DIENUM_CONTINUE; + break; + // for all other devices, contine on + default: + break; + } if (IsEqualGUID(g_sysMouse.guidInstance, lpddi->guidInstance)) return DIENUM_CONTINUE; From e9c997695142683e6d09775c2b5c7ecf545b98ed Mon Sep 17 00:00:00 2001 From: ManiacDC Date: Mon, 15 May 2017 09:56:13 -0400 Subject: [PATCH 2/3] Fix Typo in comment --- Source/nragev20/DirectInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/nragev20/DirectInput.cpp b/Source/nragev20/DirectInput.cpp index faad248ff..0169984b4 100644 --- a/Source/nragev20/DirectInput.cpp +++ b/Source/nragev20/DirectInput.cpp @@ -691,7 +691,7 @@ BOOL CALLBACK EnumMakeDeviceList( LPCDIDEVICEINSTANCE lpddi, LPVOID pvRef ) if (IsXInputDevice(&lpddi->guidProduct)) // Check if is XInput device --tecnicors return DIENUM_CONTINUE; break; - // for all other devices, contine on + // for all other devices, continue on default: break; } From 9a00a75b6059306165ffc297aef0b9885f29a7d0 Mon Sep 17 00:00:00 2001 From: Tony Date: Thu, 18 May 2017 16:03:00 -0400 Subject: [PATCH 3/3] Remove Mario Kart cheat for E and J regions Partial revert of #607. The cheat was incorrectly applied to these regions. I don't have the knowledge to apply the cheats correctly, so let's at least stop them from messing things up. --- Config/Project64.rdb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Config/Project64.rdb b/Config/Project64.rdb index 9aa6d0583..899d59440 100644 --- a/Config/Project64.rdb +++ b/Config/Project64.rdb @@ -3264,7 +3264,6 @@ Self Texture=1 Good Name=Mario Kart 64 (E) (V1.0) Internal Name=MARIOKART64 Status=Compatible -Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix Plugin Note=[Glide64] missing TVs Culling=1 Primary Frame Buffer=1 @@ -3273,7 +3272,6 @@ Primary Frame Buffer=1 Good Name=Mario Kart 64 (E) (V1.1) Internal Name=MARIOKART64 Status=Compatible -Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix Plugin Note=[Glide64] missing TVs Culling=1 Primary Frame Buffer=1 @@ -3282,7 +3280,6 @@ Primary Frame Buffer=1 Good Name=Mario Kart 64 (J) (V1.0) Internal Name=MARIOKART64 Status=Compatible -Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix Plugin Note=[Glide64] missing TVs Culling=1 Primary Frame Buffer=1 @@ -3291,7 +3288,6 @@ Primary Frame Buffer=1 Good Name=Mario Kart 64 (J) (V1.1) Internal Name=MARIOKART64 Status=Compatible -Cheat0=81001A38 2409,81001A3A 0002,81001A3C 2409,81001A3E 0002,81001C90 240A,81001C92 0002,81001C94 240A,81001C96 0002 //Multiplayer timing fix Plugin Note=[Glide64] missing TVs Culling=1 Primary Frame Buffer=1