Resend of xinput patch for bug 18218

Rafał Mużyło galtgendo at gmail.com
Sun May 3 19:12:05 CDT 2009


I didn't put DllMain in this file, as it was not
in the current version, just added numbers and
sorted (latter probably unnecessary).
-------------- next part --------------
--- dlls/xinput1_3/xinput1_3_main.c.old	2009-04-25 16:54:42.000000000 +0200
+++ dlls/xinput1_3/xinput1_3_main.c	2009-04-26 00:41:04.000000000 +0200
@@ -95,12 +95,20 @@
 {
     FIXME("(%d %d %p)\n", dwUserIndex, dwFlags, pCapabilities);
 
+    //pCapabilities = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(XINPUT_CAPABILITIES));
+    switch (dwFlags)
+    {
+      case 0:
+      case XINPUT_FLAG_GAMEPAD:
+
     if (dwUserIndex < XUSER_MAX_COUNT)
     {
         return ERROR_DEVICE_NOT_CONNECTED;
         /* If controller exists then return ERROR_SUCCESS */
     }
+      default:
     return ERROR_BAD_ARGUMENTS;
+    }
 }
 
 DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRenderGuid, GUID* pDSoundCaptureGuid)
--- dlls/xinput1_3/xinput1_3.spec.old	2009-04-24 18:52:04.000000000 +0200
+++ dlls/xinput1_3/xinput1_3.spec	2009-04-26 05:03:51.000000000 +0200
@@ -1,7 +1,7 @@
-@ stdcall XInputEnable(long)
-@ stdcall XInputSetState(long ptr)
-@ stdcall XInputGetState(long ptr)
-@ stdcall XInputGetKeystroke(long long ptr)
-@ stdcall XInputGetCapabilities(long long ptr)
-@ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr)
-@ stdcall XInputGetBatteryInformation(long ptr ptr)
+2 stdcall XInputGetState(long ptr)
+3 stdcall XInputSetState(long ptr)
+4 stdcall XInputGetCapabilities(long long ptr)
+5 stdcall XInputEnable(long)
+6 stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr)
+7 stdcall XInputGetBatteryInformation(long ptr ptr)
+8 stdcall XInputGetKeystroke(long long ptr)


More information about the wine-patches mailing list