diff --git a/Makefile b/Makefile index 6301a7f..a6a8330 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,38 @@ -# mingw32-gcc -CFLAGS = -Wl,--export-all-symbols +# Important stuff +CFLAGS = LIBS = -ldxguid -ldinput -ldinput8 -GCC32 = /usr/bin/i686-w64-mingw32-gcc -D _WXI_MINGW -INCLUDE_DIR32 = -I/usr/i686-w64-mingw32/include -LIB_DIR32 = -L/usr/i686-w64-mingw32/lib/ +# (maybe) distro-specific stuff +MINGW32 = i686-w64-mingw32 +MINGW64 = i686-w64-mingw32 +BIN = /usr/bin +USR = /usr +LIB = lib/ # used in as ${USR}/${MINGWxy}/${LIB} +INCLUDE = include/ # used in as ${USR}/${MINGWxy}/${INCLUDE} -build/32/xinput1_3.dll: xinput1_3/xinput1_3_main.c - mkdir -p build/32/ - ${GCC32} -shared ${CFLAGS} ${INCLUDE_DIR32} ${LIB_DIR32} $? ${LIBS} -o $@ +# Computed +GCC32 = ${BIN}/${MINGW32}-gcc +INCLUDE_DIR32 = -I${USR}/${MINGW32}/include +LIB_DIR32 = -L{USR}/${MINGW32}/lib/ + +GCC64 = ${BIN}/x86_64-w64-mingw32-gcc -D _WXI_MINGW +INCLUDE_DIR64 = -I${USR}/${MINGW64}/include +LIB_DIR64 = -L{USR}/${MINGW64}/lib/ -GCC64 = /usr/bin/x86_64-w64-mingw32-gcc -D _WXI_MINGW -INCLUDE_DIR64 = -I/usr/x86_64-w64-mingw32/include -LIB_DIR64 = -L/usr/x86_64-w64-mingw32/lib/ +# ---- Targets ------- + +build/32/xinput1_3.dll: xinput1_3/xinput1_3.def xinput1_3/xinput1_3_main.c + mkdir -p build/32/ + ${GCC32} --shared ${CFLAGS} ${INCLUDE_DIR32} ${LIB_DIR32} $? ${LIBS} -o $@ -build/64/xinput1_3.dll: xinput1_3/xinput1_3_main.c +build/64/xinput1_3.dll: xinput1_3/xinput1_3.def xinput1_3/xinput1_3_main.c mkdir -p build/64/ ${GCC64} -shared ${CFLAGS} ${INCLUDE_DIR64} ${LIB_DIR64} $? ${LIBS} -o $@ clean: rm -f *.o *.dll + rm -f build/32/* + rm -f build/64/* 32bit: build/32/xinput1_3.dll diff --git a/xinput1_3/xinput1_3.def b/xinput1_3/xinput1_3.def new file mode 100755 index 0000000..fe1d6d0 --- /dev/null +++ b/xinput1_3/xinput1_3.def @@ -0,0 +1,29 @@ +; Taken from x360ce + +LIBRARY "xinput1_3.dll" + +EXPORTS + ; DllMain @1 + XInputGetState @2 + XInputSetState @3 + XInputGetCapabilities @4 + XInputEnable @5 + XInputGetDSoundAudioDeviceGuids @6 + XInputGetBatteryInformation @7 + XInputGetKeystroke @8 + + ; XInput 1.4 + ; XInputGetAudioDeviceIds @10 + + ; XInput 1.3 undocumented + XInputGetStateEx @100 NONAME + XInputWaitForGuideButton @101 NONAME + XInputCancelGuideButtonWait @102 NONAME + XInputPowerOffController @103 NONAME + + ; XInput 1.4 undocumented + ; XInputGetBaseBusInformation @104 NONAME + ; XInputGetCapabilitiesEx @108 NONAME + + ; reset helper + ; Reset @256 \ No newline at end of file diff --git a/xinput1_3/xinput1_3.h b/xinput1_3/xinput1_3.h new file mode 100644 index 0000000..0b9b054 --- /dev/null +++ b/xinput1_3/xinput1_3.h @@ -0,0 +1,209 @@ +/* + * The Wine project - Xinput Joystick Library + * Copyright 2008 Andrew Fenn + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __XINPUT1_3_H +#define __XINPUT1_3_H + +#include + +#define EXPORT __declspec(dllexport) + +/* + * Bitmasks for the joysticks buttons, determines what has + * been pressed on the joystick, these need to be mapped + * to whatever device you're using instead of an xbox 360 + * joystick + */ + +#define XINPUT_GAMEPAD_DPAD_UP 0x0001 +#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002 +#define XINPUT_GAMEPAD_DPAD_LEFT 0x0004 +#define XINPUT_GAMEPAD_DPAD_RIGHT 0x0008 +#define XINPUT_GAMEPAD_START 0x0010 +#define XINPUT_GAMEPAD_BACK 0x0020 +#define XINPUT_GAMEPAD_LEFT_THUMB 0x0040 +#define XINPUT_GAMEPAD_RIGHT_THUMB 0x0080 +#define XINPUT_GAMEPAD_LEFT_SHOULDER 0x0100 +#define XINPUT_GAMEPAD_RIGHT_SHOULDER 0x0200 +#define XINPUT_GAMEPAD_A 0x1000 +#define XINPUT_GAMEPAD_B 0x2000 +#define XINPUT_GAMEPAD_X 0x4000 +#define XINPUT_GAMEPAD_Y 0x8000 + +/* + * Defines the flags used to determine if the user is pushing + * down on a button, not holding a button, etc + */ + +#define XINPUT_KEYSTROKE_KEYDOWN 0x0001 +#define XINPUT_KEYSTROKE_KEYUP 0x0002 +#define XINPUT_KEYSTROKE_REPEAT 0x0004 + +/* + * Defines what type of abilities the type of joystick has + * DEVTYPE_GAMEPAD is available for all joysticks, however + * there may be more specific identifiers for other joysticks + * which are being used. + */ + +#define XINPUT_DEVTYPE_GAMEPAD 0x01 +#define XINPUT_DEVSUBTYPE_GAMEPAD 0x01 +#define XINPUT_DEVSUBTYPE_WHEEL 0x02 +#define XINPUT_DEVSUBTYPE_ARCADE_STICK 0x03 +#define XINPUT_DEVSUBTYPE_FLIGHT_SICK 0x04 +#define XINPUT_DEVSUBTYPE_DANCE_PAD 0x05 +#define XINPUT_DEVSUBTYPE_GUITAR 0x06 +#define XINPUT_DEVSUBTYPE_DRUM_KIT 0x08 + +/* + * These are used with the XInputGetCapabilities function to + * determine the abilities to the joystick which has been + * plugged in. + */ + +#define XINPUT_CAPS_VOICE_SUPPORTED 0x0004 +#define XINPUT_FLAG_GAMEPAD 0x00000001 + +/* + * Defines the status of the battery if one is used in the + * attached joystick. The first two define if the joystick + * supports a battery. Disconnected means that the joystick + * isn't connected. Wired shows that the joystick is a wired + * joystick. + */ + +#define BATTERY_DEVTYPE_GAMEPAD 0x00 +#define BATTERY_DEVTYPE_HEADSET 0x01 +#define BATTERY_TYPE_DISCONNECTED 0x00 +#define BATTERY_TYPE_WIRED 0x01 +#define BATTERY_TYPE_ALKALINE 0x02 +#define BATTERY_TYPE_NIMH 0x03 +#define BATTERY_TYPE_UNKNOWN 0xFF +#define BATTERY_LEVEL_EMPTY 0x00 +#define BATTERY_LEVEL_LOW 0x01 +#define BATTERY_LEVEL_MEDIUM 0x02 +#define BATTERY_LEVEL_FULL 0x03 + +/* + * How many joysticks can be used with this library. Games that + * use the xinput library will not go over this number. + */ + +#define XUSER_MAX_COUNT 4 +#define XUSER_INDEX_ANY 0x000000FF + +/* + * Defines the structure of an xbox 360 joystick. + */ + +typedef struct _XINPUT_GAMEPAD { + WORD wButtons; + BYTE bLeftTrigger; + BYTE bRightTrigger; + SHORT sThumbLX; + SHORT sThumbLY; + SHORT sThumbRX; + SHORT sThumbRY; +} XINPUT_GAMEPAD, *PXINPUT_GAMEPAD; + +typedef struct _XINPUT_GAMEPAD_EX { + WORD wButtons; + BYTE bLeftTrigger; + BYTE bRightTrigger; + SHORT sThumbLX; + SHORT sThumbLY; + SHORT sThumbRX; + SHORT sThumbRY; + DWORD dwPaddingReserved; +} XINPUT_GAMEPAD_EX, *PXINPUT_GAMEPAD_EX; + +typedef struct _XINPUT_STATE { + DWORD dwPacketNumber; + XINPUT_GAMEPAD Gamepad; +} XINPUT_STATE, *PXINPUT_STATE; + +typedef struct _XINPUT_STATE_EX { + DWORD dwPacketNumber; + XINPUT_GAMEPAD_EX Gamepad; +} XINPUT_STATE_EX, *PXINPUT_STATE_EX; + +/* + * Defines the structure of how much vibration is set on both the + * right and left motors in a joystick. If you're not using a 360 + * joystick you will have to map these to your device. + */ + +typedef struct _XINPUT_VIBRATION { + WORD wLeftMotorSpeed; + WORD wRightMotorSpeed; +} XINPUT_VIBRATION, *PXINPUT_VIBRATION; + +/* + * Defines the structure for what kind of abilities the joystick has + * such abilities are things such as if the joystick has the ability + * to send and receive audio, if the joystick is in fact a driving + * wheel or perhaps if the joystick is some kind of dance pad or + * guitar. + */ + +typedef struct _XINPUT_CAPABILITIES { + BYTE Type; + BYTE SubType; + WORD Flags; + XINPUT_GAMEPAD Gamepad; + XINPUT_VIBRATION Vibration; +} XINPUT_CAPABILITIES, *PXINPUT_CAPABILITIES; + +/* + * Defines the structure for a joystick input event which is + * retrieved using the function XInputGetKeystroke + */ +typedef struct _XINPUT_KEYSTROKE { + WORD VirtualKey; + WCHAR Unicode; + WORD Flags; + BYTE UserIndex; + BYTE HidCode; +} XINPUT_KEYSTROKE, *PXINPUT_KEYSTROKE; + +typedef struct _XINPUT_BATTERY_INFORMATION +{ + BYTE BatteryType; + BYTE BatteryLevel; +} XINPUT_BATTERY_INFORMATION, *PXINPUT_BATTERY_INFORMATION; + +#ifdef __cplusplus +extern "C" { +#endif + +void EXPORT XInputEnable(BOOL); +DWORD EXPORT XInputSetState(DWORD, XINPUT_VIBRATION*); +DWORD EXPORT XInputGetState(DWORD, XINPUT_STATE*); +DWORD EXPORT XInputGetKeystroke(DWORD, DWORD, PXINPUT_KEYSTROKE); +DWORD EXPORT XInputGetCapabilities(DWORD, DWORD, XINPUT_CAPABILITIES*); +DWORD EXPORT XInputGetDSoundAudioDeviceGuids(DWORD, GUID*, GUID*); +DWORD EXPORT XInputGetBatteryInformation(DWORD, BYTE, XINPUT_BATTERY_INFORMATION*); + +DWORD EXPORT XInputGetStateEx(DWORD, XINPUT_STATE_EX*); + +#ifdef __cplusplus +} +#endif + +#endif /* __XINPUT1_3_H */ diff --git a/xinput1_3/xinput1_3_main.c b/xinput1_3/xinput1_3_main.c index c210b8a..efe729c 100644 --- a/xinput1_3/xinput1_3_main.c +++ b/xinput1_3/xinput1_3_main.c @@ -18,61 +18,32 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ +#include "xinput1_3.h" -#define COBJMACROS -#include -#include -#include - -#ifdef __WINEGCC__ - // Available only with winegcc - #include "wine/debug.h" - WINE_DEFAULT_DEBUG_CHANNEL(xinput); -#endif #include "windef.h" #include "winbase.h" #include "winerror.h" #include "unknwn.h" +#include +#define DIRECTINPUT_VERSION 0x0800 #include "dinput.h" -#ifdef __MINGW32__ - // Mingw compiles weird mutation with no usable symbols without this - // TODO: I don't really know why this helps - #undef WINAPI - #define WINAPI -#endif -#include "xinput.h" #ifndef TRACE // Unavailable outside wine - #define TRACE(...) do { } while(0) + #define TRACE(format, ...) printf("TRACE[%d] " format, __LINE__, ## __VA_ARGS__) #define FIXME(...) do { } while(0) #define WARN(...) do { } while(0) #define ERR(...) do { } while(0) #endif -#ifdef __MINGW32__ - // Stuff missing in mingw - typedef struct { - WORD wButtons; - BYTE bLeftTrigger; - BYTE bRightTrigger; - SHORT sThumbLX; - SHORT sThumbLY; - SHORT sThumbRX; - SHORT sThumbRY; - DWORD dwPaddingReserved; - } XINPUT_GAMEPAD_EX; - - typedef struct { - DWORD dwPacketNumber; - XINPUT_GAMEPAD_EX Gamepad; - } XINPUT_STATE_EX; +#ifndef DECLSPEC_HOTPATCH + #define DECLSPEC_HOTPATCH #endif -/* Not defined in the headers, used only by XInputGetStateEx */ -#define XINPUT_GAMEPAD_GUIDE 0x0400 - +#ifndef XINPUT_GAMEPAD_GUIDE + #define XINPUT_GAMEPAD_GUIDE 0x0400 +#endif struct CapsFlags { @@ -85,7 +56,7 @@ static struct ControllerMap LPDIRECTINPUTDEVICE8A device; BOOL connected, acquired; struct CapsFlags caps; - XINPUT_STATE state; + XINPUT_STATE_EX state_ex; XINPUT_VIBRATION vibration; BOOL vibration_dirty; @@ -93,6 +64,7 @@ static struct ControllerMap LPDIRECTINPUTEFFECT effect_instance; } controllers[XUSER_MAX_COUNT]; + static struct { LPDIRECTINPUT8A iface; @@ -102,6 +74,7 @@ static struct #define STARTUP_DINPUT if (!dinput.iface) dinput_start(); + /* ========================= Internal functions ============================= */ static BOOL dinput_is_good(const LPDIRECTINPUTDEVICE8A device, struct CapsFlags *caps) @@ -179,7 +152,7 @@ static BOOL dinput_set_range(const LPDIRECTINPUTDEVICE8A device) return TRUE; } -static void dinput_joystate_to_xinput(DIJOYSTATE2 *js, XINPUT_GAMEPAD *gamepad, struct CapsFlags *caps) +static void dinput_joystate_to_xinput(DIJOYSTATE2 *js, XINPUT_GAMEPAD_EX *gamepad, struct CapsFlags *caps) { static const int xbox_buttons[] = { XINPUT_GAMEPAD_A, @@ -190,12 +163,13 @@ static void dinput_joystate_to_xinput(DIJOYSTATE2 *js, XINPUT_GAMEPAD *gamepad, XINPUT_GAMEPAD_RIGHT_SHOULDER, XINPUT_GAMEPAD_BACK, XINPUT_GAMEPAD_START, - 0, /* xbox key not used */ + XINPUT_GAMEPAD_GUIDE, XINPUT_GAMEPAD_LEFT_THUMB, XINPUT_GAMEPAD_RIGHT_THUMB }; int i, buttons; + gamepad->dwPaddingReserved = 0; gamepad->wButtons = 0x0000; /* First the D-Pad which is recognized as a POV in dinput */ if (caps->pov) @@ -291,7 +265,8 @@ static void dinput_send_effect(int index, int power) hr = IDirectInputEffect_SetParameters(*instance, effect, DIEP_AXES | DIEP_DIRECTION | DIEP_NODOWNLOAD); if (FAILED(hr)) { - IUnknown_Release(*instance); + // TODO: I may just introduce memory leak + // IUnknown_Release(*instance); *instance = NULL; WARN("Failed to configure effect (0x%x)\n", hr); return; @@ -364,7 +339,7 @@ static void dinput_update(int index) { HRESULT hr; DIJOYSTATE2 data; - XINPUT_GAMEPAD gamepad; + XINPUT_GAMEPAD_EX gamepad; if (dinput.enabled) { @@ -394,28 +369,38 @@ static void dinput_update(int index) else memset(&gamepad, 0, sizeof(gamepad)); - if (memcmp(&controllers[index].state.Gamepad, &gamepad, sizeof(gamepad))) + if (memcmp(&controllers[index].state_ex.Gamepad, &gamepad, sizeof(gamepad))) { - controllers[index].state.Gamepad = gamepad; - controllers[index].state.dwPacketNumber++; + controllers[index].state_ex.Gamepad = gamepad; + controllers[index].state_ex.dwPacketNumber++; } } -/* ============================ Dll Functions =============================== */ -BOOL WINAPI DllMain(HINSTANCE inst, DWORD reason, LPVOID reserved) +/* ============================ Dll Functions =============================== */ + +BOOL APIENTRY DllMain( HMODULE hModule, + DWORD ul_reason_for_call, + LPVOID lpReserved + ) { - switch(reason) - { - case DLL_PROCESS_ATTACH: - DisableThreadLibraryCalls(inst); - break; - } - return TRUE; + switch (ul_reason_for_call) + { + case DLL_PROCESS_ATTACH: + DisableThreadLibraryCalls(hModule); + break; + case DLL_THREAD_ATTACH: + case DLL_THREAD_DETACH: + case DLL_PROCESS_DETACH: + break; + } + return TRUE; } -void WINAPI XInputEnable(BOOL enable) + + +void EXPORT XInputEnable(BOOL enable) { /* Setting to false will stop messages from XInputSetState being sent to the controllers. Setting to true will send the last vibration @@ -438,9 +423,9 @@ void WINAPI XInputEnable(BOOL enable) } } -DWORD WINAPI XInputSetState(DWORD index, XINPUT_VIBRATION* vibration) +DWORD EXPORT XInputSetState(DWORD index, XINPUT_VIBRATION* vibration) { - TRACE("(%u %p)\n", index, vibration); + // TRACE("(%u %p)\n", index, vibration); STARTUP_DINPUT @@ -471,52 +456,48 @@ DWORD WINAPI XInputSetState(DWORD index, XINPUT_VIBRATION* vibration) return ERROR_SUCCESS; } -DWORD WINAPI XInputGetState(DWORD index, XINPUT_STATE* state) + +DWORD EXPORT DECLSPEC_HOTPATCH XInputGetStateEx(DWORD index, XINPUT_STATE_EX* state_ex) { - union - { - XINPUT_STATE state; - XINPUT_STATE_EX state_ex; - } xinput; - DWORD ret; + TRACE("(%u %p)\n", index, state_ex); - TRACE("(%u %p)\n", index, state); - STARTUP_DINPUT + STARTUP_DINPUT if (index >= XUSER_MAX_COUNT) return ERROR_BAD_ARGUMENTS; if (!controllers[index].connected) - return ERROR_DEVICE_NOT_CONNECTED; - + return ERROR_DEVICE_NOT_CONNECTED; - dinput_update(index); - *state = controllers[index].state; - - /* The main difference between this and the Ex version is the media guide button */ - /* TODO: Check on this. - * xinput.state.Gamepad.wButtons &= ~XINPUT_GAMEPAD_GUIDE; - * *state = xinput.state; - */ + dinput_update(index); + //broforce does not pass a correct XINPUT_STATE_EX, so only copy the old struct size + *(XINPUT_GAMEPAD *)state_ex = *(XINPUT_GAMEPAD *)&controllers[index].state_ex; return ERROR_SUCCESS; } -DWORD WINAPI XInputGetStateEx(DWORD index, XINPUT_STATE_EX* state_ex) + +DWORD EXPORT DECLSPEC_HOTPATCH XInputGetState(DWORD index, XINPUT_STATE* state) { - static int warn_once; + union + { + XINPUT_STATE state; + XINPUT_STATE_EX state_ex; + } xinput; + DWORD ret; - if (!warn_once++) - FIXME("(index %u, state %p) Stub!\n", index, state_ex); + ret = XInputGetStateEx(index, &xinput.state_ex); + if (ret != ERROR_SUCCESS) + return ret; - if (index >= XUSER_MAX_COUNT) - return ERROR_BAD_ARGUMENTS; - if (!controllers[index].connected) - return ERROR_DEVICE_NOT_CONNECTED; + /* The main difference between this and the Ex version is the media guide button */ + *state = xinput.state; + state->Gamepad.wButtons &= ~XINPUT_GAMEPAD_GUIDE; - return ERROR_NOT_SUPPORTED; + return ERROR_SUCCESS; } -DWORD WINAPI XInputGetKeystroke(DWORD index, DWORD reserved, PXINPUT_KEYSTROKE keystroke) + +DWORD EXPORT XInputGetKeystroke(DWORD index, DWORD reserved, PXINPUT_KEYSTROKE keystroke) { FIXME("(index %u, reserved %u, keystroke %p) Stub!\n", index, reserved, keystroke); @@ -533,7 +514,7 @@ DWORD WINAPI XInputGetKeystroke(DWORD index, DWORD reserved, PXINPUT_KEYSTROKE k #define XINPUT_CAPS_WIRELESS 0x0002 #define XINPUT_CAPS_NO_NAVIGATION 0x0010 -DWORD WINAPI XInputGetCapabilities(DWORD index, DWORD flags, XINPUT_CAPABILITIES* capabilities) +DWORD EXPORT XInputGetCapabilities(DWORD index, DWORD flags, XINPUT_CAPABILITIES* capabilities) { TRACE("(%u %d %p)\n", index, flags, capabilities); @@ -550,20 +531,20 @@ DWORD WINAPI XInputGetCapabilities(DWORD index, DWORD flags, XINPUT_CAPABILITIES capabilities->Flags = 0; if (controllers[index].caps.jedi) capabilities->Flags |= XINPUT_CAPS_FFB_SUPPORTED; - if (controllers[index].caps.wireless) - capabilities->Flags |= XINPUT_CAPS_WIRELESS; + //if (controllers[index].caps.wireless) + // capabilities->Flags |= XINPUT_CAPS_WIRELESS; if (!controllers[index].caps.pov) capabilities->Flags |= XINPUT_CAPS_NO_NAVIGATION; dinput_update(index); capabilities->Vibration = controllers[index].vibration; - capabilities->Gamepad = controllers[index].state.Gamepad; + capabilities->Gamepad = *(XINPUT_GAMEPAD *)&controllers[index].state_ex.Gamepad; return ERROR_SUCCESS; } -DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD index, GUID* render_guid, GUID* capture_guid) +DWORD EXPORT XInputGetDSoundAudioDeviceGuids(DWORD index, GUID* render_guid, GUID* capture_guid) { FIXME("(index %u, render guid %p, capture guid %p) Stub!\n", index, render_guid, capture_guid); @@ -575,7 +556,7 @@ DWORD WINAPI XInputGetDSoundAudioDeviceGuids(DWORD index, GUID* render_guid, GUI return ERROR_NOT_SUPPORTED; } -DWORD WINAPI XInputGetBatteryInformation(DWORD index, BYTE type, XINPUT_BATTERY_INFORMATION* battery) +DWORD EXPORT XInputGetBatteryInformation(DWORD index, BYTE type, XINPUT_BATTERY_INFORMATION* battery) { TRACE("(%u %u %p) Stub!\n", index, type, battery); @@ -592,3 +573,20 @@ DWORD WINAPI XInputGetBatteryInformation(DWORD index, BYTE type, XINPUT_BATTERY_ return ERROR_SUCCESS; } + + +/* ============================ Additional, undocumented functions =============================== */ +DWORD EXPORT XInputWaitForGuideButton(DWORD dwUserIndex, DWORD dwFlag, LPVOID pVoid) +{ + return ERROR_SUCCESS; +} + +DWORD EXPORT XInputCancelGuideButtonWait(DWORD dwUserIndex) +{ + return ERROR_SUCCESS; +} + +DWORD EXPORT XInputPowerOffController(DWORD dwUserIndex) +{ + return ERROR_SUCCESS; +}