Added struct _DS4_SUBMIT_REPORT_EX

This commit is contained in:
Benjamin Höglinger-Stelzer
2020-09-07 18:26:49 +02:00
parent 72af14c0ee
commit 0c920602e7
3 changed files with 54 additions and 1 deletions

View File

@@ -374,6 +374,20 @@ extern "C" {
*/
VIGEM_API VIGEM_ERROR vigem_target_ds4_update(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, DS4_REPORT report);
/**
* Sends a full size state report to the provided target device.
*
* @author Benjamin "Nefarius" H<>glinger-Stelzer
* @date 07.09.2020
*
* @param vigem The driver connection object.
* @param target The target device object.
* @param report The report buffer.
*
* @returns A VIGEM_ERROR.
*/
VIGEM_API VIGEM_ERROR vigem_target_ds4_update_ex(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PUCHAR report);
/**
* Returns the internal index (serial number) the bus driver assigned to the provided
* target device object. Note that this value is specific to the inner workings of

View File

@@ -424,5 +424,39 @@ VOID FORCEINLINE DS4_SUBMIT_REPORT_INIT(
DS4_REPORT_INIT(&Report->Report);
}
#pragma endregion
typedef struct _DS4_SUBMIT_REPORT_EX
{
//
// sizeof(struct _DS4_SUBMIT_REPORT_EX)
//
_In_ ULONG Size;
//
// Serial number of target device.
//
_In_ ULONG SerialNo;
//
// Full size HID report excluding fixed Report ID.
//
_In_ UCHAR Report[63];
} DS4_SUBMIT_REPORT_EX, * PDS4_SUBMIT_REPORT_EX;
#include <poppack.h>
//
// Initializes a DualShock 4 report.
//
VOID FORCEINLINE DS4_SUBMIT_REPORT_EX_INIT(
_Out_ PDS4_SUBMIT_REPORT_EX Report,
_In_ ULONG SerialNo
)
{
RtlZeroMemory(Report, sizeof(DS4_SUBMIT_REPORT_EX));
Report->Size = sizeof(DS4_SUBMIT_REPORT_EX);
Report->SerialNo = SerialNo;
}
#pragma endregion

View File

@@ -939,6 +939,11 @@ VIGEM_ERROR vigem_target_ds4_update(
return VIGEM_ERROR_NONE;
}
VIGEM_ERROR vigem_target_ds4_update_ex(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PUCHAR report)
{
return VIGEM_API VIGEM_ERROR();
}
ULONG vigem_target_get_index(PVIGEM_TARGET target)
{
return target->SerialNo;