11/13/2022 0 Comments Gamepad companion![]() Http /en-us/library/microsoft.directx_gamepad Broken Link for safety Http /en-us/library/microsoft.directx_state Broken Link for safety XInput.dll returns controller state as a binary structure: Http /en-us/library/ms681381.aspx Broken Link for safety Gamepad companion code#If the function fails, ErrorLevel is an error code defined in Winerror.h. If the controller is not connected, ErrorLevel is ERROR_DEVICE_NOT_CONNECTED (1167). If the function succeeds, ErrorLevel is ERROR_SUCCESS (zero). The current state of the controller as an associative array. UserIndex - Index of the user's controller. Retrieves the current state of the specified controller. Throw Exception("Failed to initialize XInput: function not found.") If !(_XInput_GetState & _XInput_SetState & _XInput_GetCapabilities) _XInput_GetCapabilities := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputGetCapabilities" ,"ptr") _XInput_SetState := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputSetState" ,"ptr") || (_XInput_GetState := DllCall("GetProcAddress" ,"ptr",_XInput_hm ,"astr","XInputGetState" ,"ptr")) Throw Exception("Failed to initialize XInput: " dll " not found.") _XInput_hm := DllCall("LoadLibrary" ,"str",dll ,"ptr") XINPUT_GAMEPAD_RIGHT_STICK_DEADZONE := 8689 XINPUT_GAMEPAD_LEFT_STICK_DEADZONE := 7849 Device subtypes available in XINPUT_CAPABILITIES Device types available in XINPUT_CAPABILITIES Newer versions of XInput may require additional constants. NOTE: These are based on my outdated copy of the DirectX SDK. Initializes XInput.ahk with the given XInput DLL.ĭll - The path or name of the XInput DLL to load. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |