Andrew Fenn : xinput1_3: Added stub code for XInputGetBatteryInformation.

Alexandre Julliard julliard at winehq.org
Thu Jan 8 08:31:15 CST 2009


Module: wine
Branch: master
Commit: 907add75a9156c66536e877aafb3c9a63c77cc3e
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=907add75a9156c66536e877aafb3c9a63c77cc3e

Author: Andrew Fenn <andrewfenn at gmail.com>
Date:   Thu Jan  8 01:47:44 2009 +0700

xinput1_3: Added stub code for XInputGetBatteryInformation.

---

 dlls/xinput1_3/xinput1_3.spec   |    2 +-
 dlls/xinput1_3/xinput1_3_main.c |   12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec
index c8e0f53..be1f411 100644
--- a/dlls/xinput1_3/xinput1_3.spec
+++ b/dlls/xinput1_3/xinput1_3.spec
@@ -4,4 +4,4 @@
 @ stdcall XInputGetKeystroke(long long ptr)
 @ stdcall XInputGetCapabilities(long long ptr)
 @ stdcall XInputGetDSoundAudioDeviceGuids(long ptr ptr)
-@ stub XInputGetBatteryInformation
+@ stdcall XInputGetBatteryInformation(long ptr ptr)
diff --git a/dlls/xinput1_3/xinput1_3_main.c b/dlls/xinput1_3/xinput1_3_main.c
index 1e69bc1..f4386b8 100644
--- a/dlls/xinput1_3/xinput1_3_main.c
+++ b/dlls/xinput1_3/xinput1_3_main.c
@@ -114,3 +114,15 @@ DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD dwUserIndex, GUID* pDSoundRen
     }
     return ERROR_BAD_ARGUMENTS;
 }
+
+DWORD WINAPI XInputGetBatteryInformation(DWORD dwUserIndex, BYTE deviceType, XINPUT_BATTERY_INFORMATION* pBatteryInfo)
+{
+    FIXME("(%d %u %p) Stub!\n", dwUserIndex, deviceType, pBatteryInfo);
+
+    if (dwUserIndex < XUSER_MAX_COUNT)
+    {
+        return ERROR_DEVICE_NOT_CONNECTED;
+        /* If controller exists then return ERROR_SUCCESS */
+    }
+    return ERROR_BAD_ARGUMENTS;
+}




More information about the wine-cvs mailing list