From 907add75a9156c66536e877aafb3c9a63c77cc3e Mon Sep 17 00:00:00 2001 From: Andrew Fenn Date: Thu, 8 Jan 2009 01:47:44 +0700 Subject: [PATCH] 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 deletion(-) diff --git a/dlls/xinput1_3/xinput1_3.spec b/dlls/xinput1_3/xinput1_3.spec index c8e0f5300fe..be1f4110dbf 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 1e69bc12518..f4386b891f8 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; +}