From e5e9982dadf7f797cb258201a8927712e36e7307 Mon Sep 17 00:00:00 2001 From: Pedro Nishiyama Date: Sun, 18 Jul 2021 01:21:39 -0300 Subject: [PATCH] Added more effects --- .gitignore | 1 + DriverInstaller/DriverInstaller.vdproj | 14 +- DriverInstaller/DriverInstallerDebug.vdproj | 707 -------------------- GenericFFBDriver/Registrar.h | 226 +++++-- README.md | 2 +- 5 files changed, 195 insertions(+), 755 deletions(-) delete mode 100644 DriverInstaller/DriverInstallerDebug.vdproj diff --git a/.gitignore b/.gitignore index c5dc553..6183d40 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ x86/ Debug/ Release/ obj/ +.vs/ *.db *.opendb diff --git a/DriverInstaller/DriverInstaller.vdproj b/DriverInstaller/DriverInstaller.vdproj index 5f81eaa..87b96db 100644 --- a/DriverInstaller/DriverInstaller.vdproj +++ b/DriverInstaller/DriverInstaller.vdproj @@ -65,7 +65,7 @@ "DisplayName" = "8:Release" "IsDebugOnly" = "11:FALSE" "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:..\\Release\\VibrationDriverInstaller.msi" + "OutputFilename" = "8:..\\Release\\DualShockRumbleExtensionInstaller.msi" "PackageFilesAs" = "3:2" "PackageFileSize" = "3:-2147483648" "CabType" = "3:1" @@ -238,9 +238,9 @@ "Product" { "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:Generic USB Gamepad Vibration Driver" + "ProductName" = "8:DualShock Rumble Extension" "ProductCode" = "8:{50CD8B4D-CD82-49D1-9E0A-2B7887448068}" - "PackageCode" = "8:{EDB47070-D2FC-442D-95F2-A102800934A9}" + "PackageCode" = "8:{D97234E3-A8F2-4EE2-9CAD-EE6531629B48}" "UpgradeCode" = "8:{A08375A2-DC94-4A88-8431-ED8D9717FA62}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" @@ -248,14 +248,14 @@ "DetectNewerInstalledVersion" = "11:TRUE" "InstallAllUsers" = "11:TRUE" "ProductVersion" = "8:1.0.0" - "Manufacturer" = "8:Generic USB Gamepad Vibration Driver" + "Manufacturer" = "8:DualShock Rumble Extension" "ARPHELPTELEPHONE" = "8:" "ARPHELPLINK" = "8:" - "Title" = "8:Generic USB Gamepad Vibration Driver" + "Title" = "8:DualShock Rumble Extension" "Subject" = "8:" - "ARPCONTACT" = "8:Alessandro Menezes" + "ARPCONTACT" = "8:" "Keywords" = "8:" - "ARPCOMMENTS" = "8:Generic USB Gamepad Vibration Driver" + "ARPCOMMENTS" = "8:DualShock Rumble Extension" "ARPURLINFOABOUT" = "8:" "ARPPRODUCTICON" = "8:" "ARPIconIndex" = "3:0" diff --git a/DriverInstaller/DriverInstallerDebug.vdproj b/DriverInstaller/DriverInstallerDebug.vdproj deleted file mode 100644 index 6dab2fc..0000000 --- a/DriverInstaller/DriverInstallerDebug.vdproj +++ /dev/null @@ -1,707 +0,0 @@ -"DeployProject" -{ -"VSVersion" = "3:800" -"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}" -"IsWebType" = "8:FALSE" -"ProjectName" = "8:DriverInstallerDebug" -"LanguageId" = "3:1033" -"CodePage" = "3:1252" -"UILanguageId" = "3:1033" -"SccProjectName" = "8:" -"SccLocalPath" = "8:" -"SccAuxPath" = "8:" -"SccProvider" = "8:" - "Hierarchy" - { - "Entry" - { - "MsmKey" = "8:_9A855B283BFC488DBE4152B94AFCF1C5" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_9DF9D13D2E094E0EB10939E8BFD399EE" - "OwnerKey" = "8:_UNDEFINED" - "MsmSig" = "8:_UNDEFINED" - } - } - "Configurations" - { - "Debug" - { - "DisplayName" = "8:Debug" - "IsDebugOnly" = "11:TRUE" - "IsReleaseOnly" = "11:FALSE" - "OutputFilename" = "8:..\\Debug\\VibrationDriverInstaller.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - "{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2" - { - "Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)" - "ProductCode" = "8:.NETFramework,Version=v4.7.2" - } - } - } - } - "Release" - { - "DisplayName" = "8:Release" - "IsDebugOnly" = "11:FALSE" - "IsReleaseOnly" = "11:TRUE" - "OutputFilename" = "8:..\\Release\\VibrationDriverInstaller.msi" - "PackageFilesAs" = "3:2" - "PackageFileSize" = "3:-2147483648" - "CabType" = "3:1" - "Compression" = "3:2" - "SignOutput" = "11:FALSE" - "CertificateFile" = "8:" - "PrivateKeyFile" = "8:" - "TimeStampServer" = "8:" - "InstallerBootstrapper" = "3:2" - "BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}" - { - "Enabled" = "11:TRUE" - "PromptEnabled" = "11:TRUE" - "PrerequisitesLocation" = "2:1" - "Url" = "8:" - "ComponentsUrl" = "8:" - "Items" - { - } - } - } - } - "Deployable" - { - "CustomAction" - { - "{4AA51A2D-7D85-4A59-BA75-B0809FC8B380}:_A58FBA840C67404E868C9D92987CA01A" - { - "Name" = "8:GenericFFBDriver32.dll" - "Condition" = "8:" - "Object" = "8:" - "FileType" = "3:1" - "InstallAction" = "3:1" - "Arguments" = "8:" - "EntryPoint" = "8:RegisterVibrationDriver" - "Sequence" = "3:1" - "Identifier" = "8:_E9FCB57E_3CD7_4256_8EE5_1BFB7014D07D" - "InstallerClass" = "11:FALSE" - "CustomActionData" = "8:" - } - } - "DefaultFeature" - { - "Name" = "8:DefaultFeature" - "Title" = "8:" - "Description" = "8:" - } - "ExternalPersistence" - { - "LaunchCondition" - { - } - } - "File" - { - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9A855B283BFC488DBE4152B94AFCF1C5" - { - "SourcePath" = "8:..\\Debug\\GenericFFBDriver32.dll" - "TargetName" = "8:GenericFFBDriver32.dll" - "Tag" = "8:" - "Folder" = "8:_70D2A39DB17244D1A08BF53BE196346B" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_9DF9D13D2E094E0EB10939E8BFD399EE" - { - "SourcePath" = "8:..\\Debug\\GenericFFBDriver64.dll" - "TargetName" = "8:GenericFFBDriver64.dll" - "Tag" = "8:" - "Folder" = "8:_70D2A39DB17244D1A08BF53BE196346B" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Vital" = "11:TRUE" - "ReadOnly" = "11:FALSE" - "Hidden" = "11:FALSE" - "System" = "11:FALSE" - "Permanent" = "11:FALSE" - "SharedLegacy" = "11:FALSE" - "PackageAs" = "3:1" - "Register" = "3:1" - "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" - "IsolateTo" = "8:" - } - } - "FileType" - { - } - "Folder" - { - "{1525181F-901A-416C-8A58-119130FE478E}:_3C374CD273CA4CC39B0D8104E3AB571D" - { - "Name" = "8:#1916" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:DesktopFolder" - "Folders" - { - } - } - "{3C67513D-01DD-4637-8A68-80971EB9504F}:_70D2A39DB17244D1A08BF53BE196346B" - { - "DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]" - "Name" = "8:#1925" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:TARGETDIR" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_D65F07704BE14C7BBDEA675AC60C1B96" - { - "Name" = "8:#1919" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:ProgramMenuFolder" - "Folders" - { - } - } - "{1525181F-901A-416C-8A58-119130FE478E}:_EB20EB274A8046AEA4621B3A08C74E43" - { - "Name" = "8:#1924" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:WindowsFolder" - "Folders" - { - "{9EF0B969-E518-4E46-987F-47570745A589}:_08365EDD8FF742F7A8EA90AD36CEE015" - { - "Name" = "8:GenericFFBDriver" - "AlwaysCreate" = "11:FALSE" - "Condition" = "8:" - "Transitive" = "11:FALSE" - "Property" = "8:_C4024A52445545BFAFDC66ED44DCA719" - "Folders" - { - } - } - } - } - } - "LaunchCondition" - { - } - "Locator" - { - } - "MsiBootstrapper" - { - "LangId" = "3:1033" - "RequiresElevation" = "11:FALSE" - } - "Product" - { - "Name" = "8:Microsoft Visual Studio" - "ProductName" = "8:Generic USB Gamepad Vibration Driver" - "ProductCode" = "8:{50CD8B4D-CD82-49D1-9E0A-2B7887448068}" - "PackageCode" = "8:{FD3782BF-AD47-4F2E-8EFE-E5F85136487E}" - "UpgradeCode" = "8:{A08375A2-DC94-4A88-8431-ED8D9717FA62}" - "AspNetVersion" = "8:4.0.30319.0" - "RestartWWWService" = "11:FALSE" - "RemovePreviousVersions" = "11:FALSE" - "DetectNewerInstalledVersion" = "11:TRUE" - "InstallAllUsers" = "11:TRUE" - "ProductVersion" = "8:1.0.0" - "Manufacturer" = "8:Generic USB Gamepad Vibration Driver" - "ARPHELPTELEPHONE" = "8:" - "ARPHELPLINK" = "8:" - "Title" = "8:Generic USB Gamepad Vibration Driver" - "Subject" = "8:" - "ARPCONTACT" = "8:Alessandro Menezes" - "Keywords" = "8:" - "ARPCOMMENTS" = "8:Generic USB Gamepad Vibration Driver" - "ARPURLINFOABOUT" = "8:" - "ARPPRODUCTICON" = "8:" - "ARPIconIndex" = "3:0" - "SearchPath" = "8:" - "UseSystemSearchPath" = "11:TRUE" - "TargetPlatform" = "3:0" - "PreBuildEvent" = "8:" - "PostBuildEvent" = "8:" - "RunPostBuildEvent" = "3:0" - } - "Registry" - { - "HKLM" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_A03B79DD76BC403D8D64F0A5924EDAA2" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_9C43F01D1E7E43D182803227C7A74A7A" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCU" - { - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_BB99176430A34FDBB16EC9E3116E7EE1" - { - "Name" = "8:Software" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - "{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_D26FE68C1E724154A3D4AA81E6752CA3" - { - "Name" = "8:[Manufacturer]" - "Condition" = "8:" - "AlwaysCreate" = "11:FALSE" - "DeleteAtUninstall" = "11:FALSE" - "Transitive" = "11:FALSE" - "Keys" - { - } - "Values" - { - } - } - } - "Values" - { - } - } - } - } - "HKCR" - { - "Keys" - { - } - } - "HKU" - { - "Keys" - { - } - } - "HKPU" - { - "Keys" - { - } - } - } - "Sequences" - { - } - "Shortcut" - { - } - "UserInterface" - { - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_0FF6F84D0BA54521991F2527BD699A88" - { - "Name" = "8:#1902" - "Sequence" = "3:2" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_27D0116D431343499F8962DAE0B00519" - { - "Sequence" = "3:100" - "DisplayName" = "8:Concluído" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_24F6F4B7064B47979A0B600ED5E601DD" - { - "Name" = "8:#1901" - "Sequence" = "3:2" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_4D7B9E7D283848AC86EBDCF44654BE9C" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progresso" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_54D9D9225BFE431CAE28289D40AEEE77" - { - "Name" = "8:#1901" - "Sequence" = "3:1" - "Attributes" = "3:2" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_65F0BC8F89BB4BFBBA673E2CB16B605F" - { - "Sequence" = "3:100" - "DisplayName" = "8:Progresso" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdProgressDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "ShowProgress" - { - "Name" = "8:ShowProgress" - "DisplayName" = "8:#1009" - "Description" = "8:#1109" - "Type" = "3:5" - "ContextData" = "8:1;True=1;False=0" - "Attributes" = "3:0" - "Setting" = "3:0" - "Value" = "3:1" - "DefaultValue" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_584332E75132435AB9FB749AF7B4E61C" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdUserInterface.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_6F17A7FA3C9B4FF69A30A170352D707D" - { - "Name" = "8:#1900" - "Sequence" = "3:2" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_6B933086611643879EEF520AA3F86685" - { - "Sequence" = "3:100" - "DisplayName" = "8:Bem-vindo" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9BE8FAE1869B4AF9A0C02B28C9389574" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirmar Instalação" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdAdminConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_781D1A01A61242E48BB1652DE8A42A73" - { - "UseDynamicProperties" = "11:FALSE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdBasicDialogs.wim" - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_995B3019C9464C2A9514AE443DF7CF47" - { - "Name" = "8:#1902" - "Sequence" = "3:1" - "Attributes" = "3:3" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_55481C96BD37447D9F16309504026CE4" - { - "Sequence" = "3:100" - "DisplayName" = "8:Concluído" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdFinishedDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "UpdateText" - { - "Name" = "8:UpdateText" - "DisplayName" = "8:#1058" - "Description" = "8:#1158" - "Type" = "3:15" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1258" - "DefaultValue" = "8:#1258" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - "{DF760B10-853B-4699-99F2-AFF7185B4A62}:_DA878B541BD14957B064CE6842C379A6" - { - "Name" = "8:#1900" - "Sequence" = "3:1" - "Attributes" = "3:1" - "Dialogs" - { - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_DD51DDF859CE471FA216BD8D94DC9BF2" - { - "Sequence" = "3:300" - "DisplayName" = "8:Confirmar Instalação" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdConfirmDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - } - } - "{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_F1A2FA987BAA486495F47BEBD0FEDCCA" - { - "Sequence" = "3:100" - "DisplayName" = "8:Bem-vindo" - "UseDynamicProperties" = "11:TRUE" - "IsDependency" = "11:FALSE" - "SourcePath" = "8:\\VsdWelcomeDlg.wid" - "Properties" - { - "BannerBitmap" - { - "Name" = "8:BannerBitmap" - "DisplayName" = "8:#1001" - "Description" = "8:#1101" - "Type" = "3:8" - "ContextData" = "8:Bitmap" - "Attributes" = "3:4" - "Setting" = "3:1" - "UsePlugInResources" = "11:TRUE" - } - "CopyrightWarning" - { - "Name" = "8:CopyrightWarning" - "DisplayName" = "8:#1002" - "Description" = "8:#1102" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1202" - "DefaultValue" = "8:#1202" - "UsePlugInResources" = "11:TRUE" - } - "Welcome" - { - "Name" = "8:Welcome" - "DisplayName" = "8:#1003" - "Description" = "8:#1103" - "Type" = "3:3" - "ContextData" = "8:" - "Attributes" = "3:0" - "Setting" = "3:1" - "Value" = "8:#1203" - "DefaultValue" = "8:#1203" - "UsePlugInResources" = "11:TRUE" - } - } - } - } - } - } - "MergeModule" - { - } - "ProjectOutput" - { - } - } -} diff --git a/GenericFFBDriver/Registrar.h b/GenericFFBDriver/Registrar.h index efde64f..48d9ab2 100644 --- a/GenericFFBDriver/Registrar.h +++ b/GenericFFBDriver/Registrar.h @@ -27,7 +27,7 @@ class CRegistrar RegCloseKey(hKeyResult); return (retVal == ERROR_SUCCESS) ? TRUE:FALSE; } - BOOL SetInRegistry(HKEY hRootKey, LPCSTR subKey, LPCSTR keyName, LPVOID keyValue, DWORD keyValueLen) + BOOL SetInRegistry(HKEY hRootKey, LPCSTR subKey, LPCSTR keyName, const BYTE* keyValue, DWORD keyValueLen) { HKEY hKeyResult; DWORD dwDisposition; @@ -36,7 +36,7 @@ class CRegistrar { return FALSE; } - DWORD retVal = RegSetValueExA(hKeyResult, keyName, 0, REG_BINARY, (const BYTE *)keyValue, keyValueLen); + DWORD retVal = RegSetValueExA(hKeyResult, keyName, 0, REG_BINARY, keyValue, keyValueLen); RegCloseKey(hKeyResult); return (retVal == ERROR_SUCCESS) ? TRUE : FALSE; } @@ -131,21 +131,32 @@ class CDllRegistrar : public CRegistrar if(! SetInRegistry(HKEY_CLASSES_ROOT, buffer, "ThreadingModel", "Both")) return false; - // Creating DirectInput keys - const char* oemPath = "SYSTEM\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Joystick\\OEM\\VID_0D9D&PID_3012\\OEMForceFeedback"; - - if (!SetInRegistry(HKEY_LOCAL_MACHINE, oemPath, "CLSID", "{B4FE8B13-40D0-438A-B4C2-DE4522951071}")) - return false; - - const byte attrVal[] = { - 0x00, 0x00, 0x00, 0x00, - 0xe8, 0x03, 0x00, 0x00, - 0xe8, 0x03, 0x00, 0x00 + // Root ---------------- + const char* root = "SYSTEM\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Joystick\\OEM\\VID_0D9D&PID_3012"; + const byte oemData[] = { + 0x03, 0x00, 0x08, 0x10, 0x0c, 0x00, 0x00, 0x00 + }; + byte dData[] = { + 0x00, 0x00, 0x00, 0x00 }; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, oemPath, "Attributes", (LPVOID)attrVal, 12)) + + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "OEMName", "DualShock Adapter")) return false; - - // Registering Axe attributes + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "OEMData", oemData, 8)) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "DebugLevel", dData, 4)) + return false; + dData[0] = 0x19; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "Delay", dData, 4)) + return false; + dData[0] = 0xe8; dData[1] = 0x03; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "Amplify", dData, 4)) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, root, "ConfigCLSID", "{B4FE8B13-40D0-438A-B4C2-DE4522951071}")) + return false; + // Root ---------------- + + // AXES ---------------- const char* axePath = "SYSTEM\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Joystick\\OEM\\VID_0D9D&PID_3012\\Axes"; byte axeAttrData[] = { 0x01, 0x81, 0x00, 0x00, 0x01, 0x00, 0x30, 0x00 @@ -155,48 +166,183 @@ class CDllRegistrar : public CRegistrar }; sprintf_s(buffer, "%s\\%d", axePath, 0); - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", (LPVOID)axeAttrData, 8)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "X axis")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", axeAttrData, 8)) return false; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", (LPVOID)axeFFAttrData, 8)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", axeFFAttrData, 8)) return false; sprintf_s(buffer, "%s\\%d", axePath, 1); axeAttrData[6] = 0x31; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", (LPVOID)axeAttrData, 8)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Y axis")) return false; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", (LPVOID)axeFFAttrData, 8)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", axeAttrData, 8)) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", axeFFAttrData, 8)) return false; - - // Registering effects - sprintf_s(buffer, "%s\\Effects", oemPath); - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "")) + sprintf_s(buffer, "%s\\%d", axePath, 2); + axeAttrData[6] = 0x32; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Z axis")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", axeAttrData, 8)) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", axeFFAttrData, 8)) return false; - // Constant force - sprintf_s(buffer, "%s\\Effects\\%s", oemPath, "{13541C20-8E33-11D0-9AD0-00A0C9A06E35}"); - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Constant")) + sprintf_s(buffer, "%s\\%d", axePath, 5); + axeAttrData[6] = 0x35; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Rz axis")) return false; - const byte attrConstForceVal[] = { - 0x00, 0x00, 0x00, 0x00, 0x01, 0x86, 0x00, 0x00, - 0xed, 0x03, 0x00, 0x00, 0xed, 0x03, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00 - }; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", (LPVOID)attrConstForceVal, 20)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", axeAttrData, 8)) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "FFAttributes", axeFFAttrData, 8)) return false; + // AXES ---------------- + + // Buttons ------------- + const char* btnPath = "SYSTEM\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Joystick\\OEM\\VID_0D9D&PID_3012\\Buttons"; + byte btnData[] = { + 0x02, 0x80, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00 + }; + + for (int i = 0; i < 12; i++) + { + sprintf_s(buffer, "%s\\%d", btnPath, i); + btnData[6] = i+1; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", btnData, 8)) + return false; + } + // Buttons ------------- + + // ForceFeedback ------- + const char* oemPath = "SYSTEM\\CurrentControlSet\\Control\\MediaProperties\\PrivateProperties\\Joystick\\OEM\\VID_0D9D&PID_3012\\OEMForceFeedback"; - // Sine wave force - sprintf_s(buffer, "%s\\Effects\\%s", oemPath, "{13541C23-8E33-11D0-9AD0-00A0C9A06E35}"); - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Sine Wave")) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, oemPath, "CLSID", "{B4FE8B13-40D0-438A-B4C2-DE4522951071}")) return false; - const byte attrSineForceVal[] = { - 0x03, 0x00, 0x00, 0x00, 0x03, 0x86, 0x00, 0x00, - 0xef, 0x03, 0x00, 0x00, 0xef, 0x03, 0x00, 0x00, - 0x30, 0x00, 0x00, 0x00 + + const byte attrVal[] = { + 0x00, 0x00, 0x00, 0x00, + 0xe8, 0x03, 0x00, 0x00, + 0xe8, 0x03, 0x00, 0x00 }; - if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", (LPVOID)attrSineForceVal, 20)) + if (!SetInRegistry(HKEY_LOCAL_MACHINE, oemPath, "Attributes", attrVal, 12)) + return false; + // ForceFeedback ------- + + // Effects ------------- + sprintf_s(buffer, "%s\\Effects", oemPath); + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "")) return false; + for (int i = 0; i < 12; i++) + { + sprintf_s(buffer, "%s\\Effects\\{13541C2%01X-8E33-11D0-9AD0-00A0C9A06E35}", oemPath, i); + + switch (i) + { + case 0: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Constant")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x00,0x00,0x00,0x00,0x01,0x86,0x00,0x00,0xed,0x03,0x00,0x00,0xed,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 1: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Ramp Force")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x01,0x00,0x00,0x00,0x02,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 2: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Square Wave")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x02,0x00,0x00,0x00,0x03,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 3: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Sine Wave")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x03,0x00,0x00,0x00,0x03,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 4: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Triangle Wave")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x04,0x00,0x00,0x00,0x03,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 5: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Sawtooth Up Wave")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x05,0x00,0x00,0x00,0x03,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 6: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Sawtooth Down Wave")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x06,0x00,0x00,0x00,0x03,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 7: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Spring")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x07,0x00,0x00,0x00,0x04,0xd8,0x00,0x00,0x6d,0x03,0x00,0x00,0x6d,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 8: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Damper")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x08,0x00,0x00,0x00,0x04,0xd8,0x00,0x00,0x6d,0x03,0x00,0x00,0x6d,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 9: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Inertia")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x09,0x00,0x00,0x00,0x04,0xd8,0x00,0x00,0x6d,0x03,0x00,0x00,0x6d,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 10: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "Friction")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x0a,0x00,0x00,0x00,0x04,0xd8,0x00,0x00,0x6d,0x03,0x00,0x00,0x6d,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + case 11: + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "", "CustomForce")) + return false; + if (!SetInRegistry(HKEY_LOCAL_MACHINE, buffer, "Attributes", new byte[]{ + 0x00,0x01,0x00,0x00,0x05,0x86,0x00,0x00,0xef,0x03,0x00,0x00,0xef,0x03,0x00,0x00,0x30,0x00,0x00,0x00 + }, 20)) + return false; + break; + } + } + + // Effects ------------- + return true; } diff --git a/README.md b/README.md index aad2a85..ef86890 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Use the latest installer found here: https://github.com/NishiyamaPedro/DualShock-Rumble-Extension/releases -**It is highly recommended that you use HidHide with xOutput 3 with this driver for the best experience.** +**It is highly recommended that you use HidHide and xOutput 3 with this driver for the best experience.** ### Know Issus