From f1ba90bd3ea441039a131fdad7b935601174eecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 28 Jan 2018 16:20:10 +0100 Subject: [PATCH] Moved shared header files --- XInputOverrides.h | 51 --------- XnaGuardianShared.h | 105 ------------------- ViGEmBusDriver.h => include/ViGEmBusDriver.h | 0 ViGEmBusShared.h => include/ViGEmBusShared.h | 0 ViGEmClient.h => include/ViGEmClient.h | 0 ViGEmCommon.h => include/ViGEmCommon.h | 0 ViGEmUtil.h => include/ViGEmUtil.h | 0 7 files changed, 156 deletions(-) delete mode 100644 XInputOverrides.h delete mode 100644 XnaGuardianShared.h rename ViGEmBusDriver.h => include/ViGEmBusDriver.h (100%) rename ViGEmBusShared.h => include/ViGEmBusShared.h (100%) rename ViGEmClient.h => include/ViGEmClient.h (100%) rename ViGEmCommon.h => include/ViGEmCommon.h (100%) rename ViGEmUtil.h => include/ViGEmUtil.h (100%) diff --git a/XInputOverrides.h b/XInputOverrides.h deleted file mode 100644 index a4853ea..0000000 --- a/XInputOverrides.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -MIT License - -Copyright (c) 2016 Benjamin "Nefarius" Höglinger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - - -#pragma once - -typedef enum _XINPUT_GAMEPAD_OVERRIDES -{ - XINPUT_GAMEPAD_OVERRIDE_DPAD_UP = 0x00000001, - XINPUT_GAMEPAD_OVERRIDE_DPAD_DOWN = 0x00000002, - XINPUT_GAMEPAD_OVERRIDE_DPAD_LEFT = 0x00000004, - XINPUT_GAMEPAD_OVERRIDE_DPAD_RIGHT = 0x00000008, - XINPUT_GAMEPAD_OVERRIDE_START = 0x00000010, - XINPUT_GAMEPAD_OVERRIDE_BACK = 0x00000020, - XINPUT_GAMEPAD_OVERRIDE_LEFT_THUMB = 0x00000040, - XINPUT_GAMEPAD_OVERRIDE_RIGHT_THUMB = 0x00000080, - XINPUT_GAMEPAD_OVERRIDE_LEFT_SHOULDER = 0x00000100, - XINPUT_GAMEPAD_OVERRIDE_RIGHT_SHOULDER = 0x00000200, - XINPUT_GAMEPAD_OVERRIDE_A = 0x00001000, - XINPUT_GAMEPAD_OVERRIDE_B = 0x00002000, - XINPUT_GAMEPAD_OVERRIDE_X = 0x00004000, - XINPUT_GAMEPAD_OVERRIDE_Y = 0x00008000, - XINPUT_GAMEPAD_OVERRIDE_LEFT_TRIGGER = 0x00010000, - XINPUT_GAMEPAD_OVERRIDE_RIGHT_TRIGGER = 0x00020000, - XINPUT_GAMEPAD_OVERRIDE_LEFT_THUMB_X = 0x00040000, - XINPUT_GAMEPAD_OVERRIDE_LEFT_THUMB_Y = 0x00080000, - XINPUT_GAMEPAD_OVERRIDE_RIGHT_THUMB_X = 0x00100000, - XINPUT_GAMEPAD_OVERRIDE_RIGHT_THUMB_Y = 0x00200000 -} XINPUT_GAMEPAD_OVERRIDES, *PXINPUT_GAMEPAD_OVERRIDES; - diff --git a/XnaGuardianShared.h b/XnaGuardianShared.h deleted file mode 100644 index 9981726..0000000 --- a/XnaGuardianShared.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -MIT License - -Copyright (c) 2016 Benjamin "Nefarius" Höglinger - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. -*/ - - -#pragma once - -#define XNA_GUARDIAN_DEVICE_PATH TEXT("\\\\.\\XnaGuardian") - -#define XINPUT_MAX_DEVICES 0x04 - -#define VALID_USER_INDEX(_index_) ((_index_ >= 0) && (_index_ < XINPUT_MAX_DEVICES)) - -// -// Custom extensions -// -#define XINPUT_EXT_TYPE 0x8001 -#define XINPUT_EXT_CODE 0x801 - -#define IOCTL_XINPUT_EXT_OVERRIDE_GAMEPAD_STATE CTL_CODE(XINPUT_EXT_TYPE, XINPUT_EXT_CODE + 0x01, METHOD_BUFFERED, FILE_WRITE_DATA) -#define IOCTL_XINPUT_EXT_PEEK_GAMEPAD_STATE CTL_CODE(XINPUT_EXT_TYPE, XINPUT_EXT_CODE + 0x02, METHOD_BUFFERED, FILE_READ_DATA | FILE_WRITE_DATA) - - -// -// State of the gamepad (compatible to XINPUT_GAMEPAD) -// -typedef struct _XINPUT_GAMEPAD_STATE { - USHORT wButtons; - BYTE bLeftTrigger; - BYTE bRightTrigger; - SHORT sThumbLX; - SHORT sThumbLY; - SHORT sThumbRX; - SHORT sThumbRY; -} XINPUT_GAMEPAD_STATE, *PXINPUT_GAMEPAD_STATE; - -// -// Context data for IOCTL_XINPUT_EXT_OVERRIDE_GAMEPAD_STATE I/O control code -// -typedef struct _XINPUT_EXT_OVERRIDE_GAMEPAD -{ - IN ULONG Size; - - IN UCHAR UserIndex; - - IN ULONG Overrides; - - IN XINPUT_GAMEPAD_STATE Gamepad; - -} XINPUT_EXT_OVERRIDE_GAMEPAD, *PXINPUT_EXT_OVERRIDE_GAMEPAD; - -VOID FORCEINLINE XINPUT_EXT_OVERRIDE_GAMEPAD_INIT( - _Out_ PXINPUT_EXT_OVERRIDE_GAMEPAD OverrideGamepad, - _In_ UCHAR UserIndex -) -{ - RtlZeroMemory(OverrideGamepad, sizeof(XINPUT_EXT_OVERRIDE_GAMEPAD)); - - OverrideGamepad->Size = sizeof(XINPUT_EXT_OVERRIDE_GAMEPAD); - OverrideGamepad->UserIndex = UserIndex; -} - -// -// Context data for IOCTL_XINPUT_EXT_PEEK_GAMEPAD_STATE I/O control code -// -typedef struct _XINPUT_EXT_PEEK_GAMEPAD -{ - IN ULONG Size; - - IN UCHAR UserIndex; - -} XINPUT_EXT_PEEK_GAMEPAD, *PXINPUT_EXT_PEEK_GAMEPAD; - -VOID FORCEINLINE XINPUT_EXT_PEEK_GAMEPAD_INIT( - _Out_ PXINPUT_EXT_PEEK_GAMEPAD PeekGamepad, - _In_ UCHAR UserIndex -) -{ - RtlZeroMemory(PeekGamepad, sizeof(XINPUT_EXT_PEEK_GAMEPAD)); - - PeekGamepad->Size = sizeof(XINPUT_EXT_PEEK_GAMEPAD); - PeekGamepad->UserIndex = UserIndex; -} - - diff --git a/ViGEmBusDriver.h b/include/ViGEmBusDriver.h similarity index 100% rename from ViGEmBusDriver.h rename to include/ViGEmBusDriver.h diff --git a/ViGEmBusShared.h b/include/ViGEmBusShared.h similarity index 100% rename from ViGEmBusShared.h rename to include/ViGEmBusShared.h diff --git a/ViGEmClient.h b/include/ViGEmClient.h similarity index 100% rename from ViGEmClient.h rename to include/ViGEmClient.h diff --git a/ViGEmCommon.h b/include/ViGEmCommon.h similarity index 100% rename from ViGEmCommon.h rename to include/ViGEmCommon.h diff --git a/ViGEmUtil.h b/include/ViGEmUtil.h similarity index 100% rename from ViGEmUtil.h rename to include/ViGEmUtil.h