From ae1562fb09b5707b4d85704018be9ae19fa58dc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Wed, 20 Dec 2017 19:43:42 +0100 Subject: [PATCH] Updated version to 1.14.1.0 [Fixed #68] DualShock 4 emulation not working on 32-Bit systems --- Ds4.h | 4 ++++ ViGEmBus.rc | 8 ++++---- ViGEmBus.vcxproj | 16 ++++++++-------- buspdo.c | 12 +++++++++++- 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/Ds4.h b/Ds4.h index 7c9faa0..b590282 100644 --- a/Ds4.h +++ b/Ds4.h @@ -39,7 +39,11 @@ SOFTWARE. #define HID_REPORT_ID_4 0x14 #define DS4_DESCRIPTOR_SIZE 0x0029 +#if defined(_X86_) +#define DS4_CONFIGURATION_SIZE 0x0050 +#else #define DS4_CONFIGURATION_SIZE 0x0070 +#endif #define DS4_HID_REPORT_DESCRIPTOR_SIZE 0x01D3 #define DS4_MANUFACTURER_NAME_LENGTH 0x38 diff --git a/ViGEmBus.rc b/ViGEmBus.rc index 62dc406..4891fb7 100644 --- a/ViGEmBus.rc +++ b/ViGEmBus.rc @@ -51,8 +51,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,14,0,0 - PRODUCTVERSION 1,14,0,0 + FILEVERSION 1,14,1,0 + PRODUCTVERSION 1,14,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -69,12 +69,12 @@ BEGIN BEGIN VALUE "CompanyName", "Benjamin Höglinger-Stelzer" VALUE "FileDescription", "Virtual Gamepad Emulation Bus Driver" -VALUE "FileVersion", "1.14.0.0" +VALUE "FileVersion", "1.14.1.0" VALUE "InternalName", "Virtual Gamepad Emulation Bus Driver" VALUE "LegalCopyright", "Copyright (C) Benjamin Höglinger-Stelzer 2016" VALUE "OriginalFilename", "vigembus.sys" VALUE "ProductName", "Virtual Gamepad Emulation Bus Driver" -VALUE "ProductVersion", "1.14.0.0" +VALUE "ProductVersion", "1.14.1.0" END END BLOCK "VarFileInfo" diff --git a/ViGEmBus.vcxproj b/ViGEmBus.vcxproj index 811e389..7eee7ec 100644 --- a/ViGEmBus.vcxproj +++ b/ViGEmBus.vcxproj @@ -182,7 +182,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -190,7 +190,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -198,7 +198,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -206,7 +206,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -214,7 +214,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -222,7 +222,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -230,7 +230,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) @@ -238,7 +238,7 @@ - 1.14.0.0 + 1.14.1.0 $(DDK_LIB_PATH)ntstrsafe.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies) diff --git a/buspdo.c b/buspdo.c index 7bfb799..94bc057 100644 --- a/buspdo.c +++ b/buspdo.c @@ -91,7 +91,7 @@ NTSTATUS Bus_CreatePdo( WDF_OBJECT_ATTRIBUTES attributes; WDF_IO_QUEUE_CONFIG usbInQueueConfig; WDF_IO_QUEUE_CONFIG notificationsQueueConfig; - + DECLARE_CONST_UNICODE_STRING(deviceLocation, L"Virtual Gamepad Emulation Bus"); DECLARE_UNICODE_STRING_SIZE(buffer, MAX_INSTANCE_ID_LEN); // reserve space for device id @@ -587,6 +587,11 @@ VOID Pdo_EvtIoInternalDeviceControl( status = UsbPdo_GetConfigurationDescriptorType(urb, pdoData); + if (!NT_SUCCESS(status)) + { + BUS_PDO_REPORT_STAGE_RESULT(pdoData->BusInterface, ViGEmPdoInternalIoControl, pdoData->SerialNo, status); + } + break; case USB_STRING_DESCRIPTOR_TYPE: @@ -595,6 +600,11 @@ VOID Pdo_EvtIoInternalDeviceControl( status = UsbPdo_GetStringDescriptorType(urb, pdoData); + if (!NT_SUCCESS(status)) + { + BUS_PDO_REPORT_STAGE_RESULT(pdoData->BusInterface, ViGEmPdoInternalIoControl, pdoData->SerialNo, status); + } + break; case USB_INTERFACE_DESCRIPTOR_TYPE: