diff --git a/sdk/include/ViGEm/km/BusShared.h b/sdk/include/ViGEm/km/BusShared.h index bf62d7f..88662f3 100644 --- a/sdk/include/ViGEm/km/BusShared.h +++ b/sdk/include/ViGEm/km/BusShared.h @@ -62,6 +62,7 @@ DEFINE_GUID(GUID_DEVINTERFACE_BUSENUM_VIGEM, #define IOCTL_VIGEM_PLUGIN_TARGET BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x000) #define IOCTL_VIGEM_UNPLUG_TARGET BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x001) #define IOCTL_VIGEM_CHECK_VERSION BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x002) +#define IOCTL_VIGEM_WAIT_DEVICE_READY BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x003) #define IOCTL_XUSB_REQUEST_NOTIFICATION BUSENUM_RW_IOCTL(IOCTL_VIGEM_BASE + 0x200) #define IOCTL_XUSB_SUBMIT_REPORT BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x201) @@ -184,6 +185,29 @@ VOID FORCEINLINE VIGEM_CHECK_VERSION_INIT( CheckVersion->Version = Version; } +#pragma endregion + +#pragma region Wait device ready + +typedef struct _VIGEM_WAIT_DEVICE_READY +{ + IN ULONG Size; + + IN ULONG SerialNo; + +} VIGEM_WAIT_DEVICE_READY, * PVIGEM_WAIT_DEVICE_READY; + +VOID FORCEINLINE VIGEM_WAIT_DEVICE_READY_INIT( + _Out_ PVIGEM_WAIT_DEVICE_READY WaitReady, + _In_ ULONG SerialNo +) +{ + RtlZeroMemory(WaitReady, sizeof(VIGEM_WAIT_DEVICE_READY)); + + WaitReady->Size = sizeof(VIGEM_WAIT_DEVICE_READY); + WaitReady->SerialNo = SerialNo; +} + #pragma endregion #pragma region XUSB (aka Xbox 360 device) section