14 Commits

Author SHA1 Message Date
Benjamin Höglinger-Stelzer
6f03e9c68d Added vpatch tool to build cache 2022-06-26 03:41:54 +02:00
Benjamin Höglinger-Stelzer
31e6b91706 Fixes #131 2022-06-26 03:19:28 +02:00
Benjamin Höglinger-Stelzer
ab8850e2ac Updated badges
Fixed project name
2022-06-26 02:07:56 +02:00
Benjamin Höglinger-Stelzer
0c32f7fc2d Added new setup 2022-06-25 22:52:25 +02:00
Benjamin Höglinger-Stelzer
4e669c3e6b Created ViGEmBus_ARM64.ddf 2022-06-25 22:15:05 +02:00
Benjamin Höglinger-Stelzer
f65bf6b22a More fixes 2022-06-25 19:58:59 +02:00
Benjamin Höglinger-Stelzer
318fe888af Added ARM64 to build script 2022-06-25 19:55:19 +02:00
Benjamin Höglinger-Stelzer
6b02661056 Uncheck some builds 2022-06-25 19:48:17 +02:00
Benjamin Höglinger-Stelzer
1e1191a247 Fixed appveyor.yml 2022-06-25 19:46:23 +02:00
Benjamin Höglinger-Stelzer
b134e6f1de Fixed DMF path 2022-06-25 19:45:33 +02:00
Benjamin Höglinger-Stelzer
1723e0ecd7 Added ARM64 2022-06-25 19:42:26 +02:00
Benjamin Höglinger-Stelzer
c63d68340a Added ARM64 build settings 2022-06-25 19:41:59 +02:00
Benjamin Höglinger-Stelzer
4cbb3357dc Changed DMF build instructions to speed up build 2022-06-25 17:49:05 +02:00
Benjamin Höglinger-Stelzer
efe14cd917 Updated tracing routines 2022-06-25 17:46:52 +02:00
23 changed files with 1000 additions and 314 deletions

3
.gitignore vendored
View File

@@ -363,3 +363,6 @@ FodyWeavers.xsd
/setup.rpt
/drivers
/_setup
/setup/Setup Files
/setup/ViGEmBus-cache
/setup/ViGEmBus.back.aip

View File

@@ -2,7 +2,7 @@
Windows kernel-mode driver emulating well-known USB game controllers.
[![Build status](https://ci.appveyor.com/api/projects/status/rv74ufluwib52dq2?svg=true)](https://ci.appveyor.com/project/nefarius/vigembus) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.vigem.org) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus)
[![Build status](https://ci.appveyor.com/api/projects/status/rv74ufluwib52dq2?svg=true)](https://ci.appveyor.com/project/nefarius/vigembus) [![GitHub All Releases](https://img.shields.io/github/downloads/ViGEm/ViGEmBus/total)](https://somsubhra.github.io/github-release-stats/?username=ViGEm&repository=ViGEmBus) [![Discord](https://img.shields.io/discord/346756263763378176.svg)](https://discord.vigem.org) [![Website](https://img.shields.io/website-up-down-green-red/https/vigem.org.svg?label=ViGEm.org)](https://vigem.org/) [![GitHub followers](https://img.shields.io/github/followers/nefarius.svg?style=social&label=Follow)](https://github.com/nefarius) [![Twitter Follow](https://img.shields.io/twitter/follow/nefariusmaximus.svg?style=social&label=Follow)](https://twitter.com/nefariusmaximus)
<sub>(This project is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If your company is using components of ViGEm, please consider reaching out.)</sub>
@@ -111,4 +111,5 @@ This list is non-exhaustive, if you'd like to see your project included, contact
- [Touchmote](https://github.com/Ryochan7/Touchmote/tree/ryochan7)
- [Mi-ViGEm](https://github.com/grayver/mi-vigem)
- [BetterJoy](https://github.com/Davidobot/BetterJoy)
- [Regame - Cloud Gaming Engine](https://github.com/ksyun-kenc/liuguang)
- [Regame](https://github.com/ksyun-kenc/liuguang)
- [NetInput](https://github.com/usertoroot/NetInput)

View File

@@ -19,113 +19,165 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.cspr
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug_DLL|ARM64 = Debug_DLL|ARM64
Debug_DLL|x64 = Debug_DLL|x64
Debug_DLL|x86 = Debug_DLL|x86
Debug_LIB|ARM64 = Debug_LIB|ARM64
Debug_LIB|x64 = Debug_LIB|x64
Debug_LIB|x86 = Debug_LIB|x86
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release_DLL|ARM64 = Release_DLL|ARM64
Release_DLL|x64 = Release_DLL|x64
Release_DLL|x86 = Release_DLL|x86
Release_LIB|ARM64 = Release_LIB|ARM64
Release_LIB|x64 = Release_LIB|x64
Release_LIB|x86 = Release_LIB|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|ARM64.ActiveCfg = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|ARM64.Build.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|ARM64.Deploy.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x64.ActiveCfg = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x64.Build.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x64.Deploy.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x86.ActiveCfg = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x86.Build.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_DLL|x86.Deploy.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|ARM64.ActiveCfg = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|ARM64.Build.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|ARM64.Deploy.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x64.ActiveCfg = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x64.Build.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x64.Deploy.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x86.ActiveCfg = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x86.Build.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug_LIB|x86.Deploy.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|ARM64.ActiveCfg = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|ARM64.Build.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|ARM64.Deploy.0 = Debug|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x64.ActiveCfg = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x64.Build.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x64.Deploy.0 = Debug|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x86.ActiveCfg = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x86.Build.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Debug|x86.Deploy.0 = Debug|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|ARM64.ActiveCfg = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|ARM64.Build.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|ARM64.Deploy.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x64.ActiveCfg = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x64.Build.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x64.Deploy.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x86.ActiveCfg = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x86.Build.0 = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_DLL|x86.Deploy.0 = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|ARM64.ActiveCfg = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|ARM64.Build.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|ARM64.Deploy.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x64.ActiveCfg = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x64.Build.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x64.Deploy.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x86.ActiveCfg = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x86.Build.0 = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release_LIB|x86.Deploy.0 = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|ARM64.ActiveCfg = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|ARM64.Build.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|ARM64.Deploy.0 = Release|ARM64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x64.ActiveCfg = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x64.Build.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x64.Deploy.0 = Release|x64
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x86.ActiveCfg = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x86.Build.0 = Release|Win32
{040101B0-EE5C-4EF1-99EE-9F81C795C001}.Release|x86.Deploy.0 = Release|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|ARM64.ActiveCfg = Debug_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|ARM64.Build.0 = Debug_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|x64.ActiveCfg = Debug_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|x64.Build.0 = Debug_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|x86.ActiveCfg = Debug_DLL|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_DLL|x86.Build.0 = Debug_DLL|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|ARM64.ActiveCfg = Debug_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|ARM64.Build.0 = Debug_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|x64.ActiveCfg = Debug_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|x64.Build.0 = Debug_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|x86.ActiveCfg = Debug_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|x86.Build.0 = Debug_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|ARM64.ActiveCfg = Debug_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|ARM64.Build.0 = Debug_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|x64.ActiveCfg = Debug_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|x64.Build.0 = Debug_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|x86.ActiveCfg = Debug_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|x86.Build.0 = Debug_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|ARM64.ActiveCfg = Release_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|ARM64.Build.0 = Release_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|x64.ActiveCfg = Release_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|x64.Build.0 = Release_DLL|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|x86.ActiveCfg = Release_DLL|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|x86.Build.0 = Release_DLL|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|ARM64.ActiveCfg = Release_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|ARM64.Build.0 = Release_LIB|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|x64.ActiveCfg = Release_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|x64.Build.0 = Release_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|x86.ActiveCfg = Release_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|x86.Build.0 = Release_LIB|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|ARM64.ActiveCfg = Release_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|ARM64.Build.0 = Release_DLL|ARM64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x64.ActiveCfg = Release_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x64.Build.0 = Release_LIB|x64
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x86.ActiveCfg = Release_DLL|Win32
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x86.Build.0 = Release_DLL|Win32
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|ARM64.ActiveCfg = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|ARM64.Build.0 = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|x64.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|x64.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|x86.ActiveCfg = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_DLL|x86.Build.0 = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|ARM64.ActiveCfg = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|ARM64.Build.0 = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|x64.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|x64.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|x86.ActiveCfg = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug_LIB|x86.Build.0 = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug|ARM64.ActiveCfg = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug|x64.ActiveCfg = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug|x86.ActiveCfg = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Debug|x86.Build.0 = Debug|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|ARM64.ActiveCfg = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|ARM64.Build.0 = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|x64.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|x64.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|x86.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_DLL|x86.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|ARM64.ActiveCfg = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|ARM64.Build.0 = Debug|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|x64.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|x64.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|x86.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release_LIB|x86.Build.0 = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release|ARM64.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release|x64.ActiveCfg = Release|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release|x64.Build.0 = Release|x64
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release|x86.ActiveCfg = Release|x86
{C722B85E-FC7D-475F-A518-C8E13ECDB201}.Release|x86.Build.0 = Release|x86
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_DLL|ARM64.ActiveCfg = Debug|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_DLL|x64.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_DLL|x86.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_LIB|ARM64.ActiveCfg = Debug|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_LIB|x64.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug_LIB|x86.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug|ARM64.ActiveCfg = Debug|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug|x64.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Debug|x86.ActiveCfg = Debug|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_DLL|ARM64.ActiveCfg = Release|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_DLL|x64.ActiveCfg = Release|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_DLL|x86.ActiveCfg = Release|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_LIB|ARM64.ActiveCfg = Release|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_LIB|x64.ActiveCfg = Release|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release_LIB|x86.ActiveCfg = Release|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release|ARM64.ActiveCfg = Release|ARM64
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release|x64.ActiveCfg = Release|Any CPU
{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}.Release|x86.ActiveCfg = Release|Any CPU
EndGlobalSection

18
ViGEmBus_ARM64.ddf Normal file
View File

@@ -0,0 +1,18 @@
; ViGEmBus cab file for attestation submission
.OPTION EXPLICIT
.Set CabinetFileCountThreshold=0
.Set FolderFileCountThreshold=0
.Set FolderSizeThreshold=0
.Set MaxCabinetSize=0
.Set MaxDiskFileCount=0
.Set MaxDiskSize=0
.Set CompressionType=MSZIP
.Set Cabinet=on
.Set Compress=on
; ARM64
.Set CabinetNameTemplate=ViGEmBus_ARM64.cab
.Set DestinationDir=ViGEmBus_ARM64
LICENSE
bin\ARM64\ViGEmBus.pdb
bin\ARM64\ViGEmBus\ViGEmBus.inf
bin\ARM64\ViGEmBus\ViGEmBus.sys

View File

@@ -5,11 +5,15 @@ skip_commits:
- '**/*.md'
cache:
- C:\projects\DMF
- C:\projects\ViGEmBus\vpatch.exe
platform:
- x86
- x64
- ARM64
configuration:
- Release
environment:
DmfRootPath: C:\projects\DMF
install:
- ps: iwr "https://download.microsoft.com/download/c/f/8/cf80b955-d578-4635-825c-2801911f9d79/wdk/wdksetup.exe" -OutFile wdksetup.exe
- cmd: .\wdksetup.exe /features + /q /norestart

View File

@@ -52,12 +52,15 @@ class Build : NukeBuild
var platform = MSBuildTargetPlatform.x64;
if (AppVeyor.Instance.Platform != null && AppVeyor.Instance.Platform.Equals("x86"))
if (AppVeyor.Instance.Platform is "x86")
platform = MSBuildTargetPlatform.Win32;
if (AppVeyor.Instance.Platform is "ARM64")
platform = (MSBuildTargetPlatform) "ARM64";
MSBuild(s => s
.SetTargetPath(DmfSolution)
.SetTargets("Rebuild")
.SetTargets("Build")
.SetConfiguration(Configuration)
.SetTargetPlatform(platform)
.SetMaxCpuCount(Environment.ProcessorCount)

View File

@@ -7,6 +7,7 @@
<NoWarn>CS0649;CS0169</NoWarn>
<NukeRootDirectory>..</NukeRootDirectory>
<NukeScriptDirectory>..</NukeScriptDirectory>
<Platforms>AnyCPU;ARM64</Platforms>
</PropertyGroup>
<ItemGroup>

View File

@@ -1,6 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug_DLL|ARM64">
<Configuration>Debug_DLL</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_DLL|Win32">
<Configuration>Debug_DLL</Configuration>
<Platform>Win32</Platform>
@@ -9,10 +13,18 @@
<Configuration>Debug_DLL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_LIB|ARM64">
<Configuration>Debug_LIB</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug_LIB|Win32">
<Configuration>Debug_LIB</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_DLL|ARM64">
<Configuration>Release_DLL</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_DLL|Win32">
<Configuration>Release_DLL</Configuration>
<Platform>Win32</Platform>
@@ -21,6 +33,10 @@
<Configuration>Release_DLL</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_LIB|ARM64">
<Configuration>Release_LIB</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release_LIB|Win32">
<Configuration>Release_LIB</Configuration>
<Platform>Win32</Platform>
@@ -78,12 +94,24 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@@ -91,6 +119,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
@@ -98,6 +133,13 @@
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
@@ -118,15 +160,27 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release_LIB|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|Win32'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
@@ -148,18 +202,30 @@
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<OutDir>$(SolutionDir)lib\debug\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|ARM64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|x64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<OutDir>$(SolutionDir)bin\debug\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|ARM64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|x64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<OutDir>$(SolutionDir)lib\release\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|ARM64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|x64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
<OutDir>$(SolutionDir)bin\release\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|ARM64'">
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|Win32'">
<ClCompile>
<PrecompiledHeader>
@@ -206,6 +272,20 @@
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|x64'">
<ClCompile>
<PrecompiledHeader>
@@ -221,6 +301,21 @@
<AdditionalDependencies>setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|ARM64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;VIGEM_DYNAMIC;VIGEM_EXPORTS;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<AdditionalDependencies>setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -279,6 +374,24 @@
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
@@ -298,6 +411,25 @@
<AdditionalDependencies>setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;VIGEM_DYNAMIC;VIGEM_EXPORTS;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<SDLCheck>true</SDLCheck>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalDependencies>setupapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\include\ViGEm\Client.h" />
<ClInclude Include="..\include\ViGEm\Common.h" />

323
setup/ViGEmBus.aip Normal file
View File

@@ -0,0 +1,323 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<DOCUMENT Type="Advanced Installer" CreateVersion="19.5" version="19.5" Modules="enterprise" RootPath="." Language="en_GB" Id="{AF87FF38-9FCC-4C1C-9EB0-FFD1F6AE0A13}">
<COMPONENT cid="caphyon.advinst.msicomp.ProjectOptionsComponent">
<ROW Name="HiddenItems" Value="AppXProductDetailsComponent;AppXDependenciesComponent;AppXAppDetailsComponent;AppXVisualAssetsComponent;AppXCapabilitiesComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;SccmComponent;ActSyncAppComponent;CPLAppletComponent;FixupComponent;MsiXDiffComponent;MsixManifestEditorComponent"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiPropsComponent">
<ROW Property="AI_BITMAP_DISPLAY_MODE" Value="0"/>
<ROW Property="AI_CURRENT_YEAR" Value="2022" ValueLocId="-"/>
<ROW Property="AI_FINDEXE_TITLE" Value="Select the installation package for [|ProductName]" ValueLocId="AI.Property.FindExeTitle"/>
<ROW Property="AI_PACKAGING_TOOL" Value="Advanced Installer 19.5 build 36301275" ValueLocId="-"/>
<ROW Property="ALLUSERS" Value="1"/>
<ROW Property="ARPCOMMENTS" Value="This installer database contains the logic and data required to install [|ProductName]." ValueLocId="*"/>
<ROW Property="ARPHELPLINK" Value="https://vigem.org/projects/ViGEm/"/>
<ROW Property="ARPNOMODIFY" MultiBuildValue="DefaultBuild:1"/>
<ROW Property="ARPNOREPAIR" Value="1" MultiBuildValue="DefaultBuild:1"/>
<ROW Property="ARPPRODUCTICON" Value="ViGEm.exe" Type="8"/>
<ROW Property="ARPURLINFOABOUT" Value="https://vigem.org/Community-Support/"/>
<ROW Property="ARPURLUPDATEINFO" Value="https://github.com/ViGEm/ViGEmBus/releases"/>
<ROW Property="AiLicenseAgreementLink" Value="https://github.com/ViGEm/ViGEmBus/blob/master/LICENSE" Type="4"/>
<ROW Property="IAgree" Value="No" Type="4"/>
<ROW Property="Manufacturer" Value="Nefarius Software Solutions e.U."/>
<ROW Property="ProductCode" Value="2057:{28A084F8-FBA9-4097-9CA6-3A9C70C6585B} " Type="16"/>
<ROW Property="ProductLanguage" Value="1033"/>
<ROW Property="ProductName" Value="ViGEm Bus Driver"/>
<ROW Property="ProductVersion" Value="1.18.367"/>
<ROW Property="REBOOT" MultiBuildValue="DefaultBuild:Force"/>
<ROW Property="SecureCustomProperties" Value="OLDPRODUCTS;AI_NEWERPRODUCTFOUND;AI_SETUPEXEPATH;SETUPEXEDIR;UPGRADE_1"/>
<ROW Property="UpgradeCode" Value="{67175F6C-AA18-43A7-AE60-2FC3FD10BF79}"/>
<ROW Property="WindowsType9X" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsType9XDisplay" MultiBuildValue="DefaultBuild:Windows 9x/ME" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT40Display" MultiBuildValue="DefaultBuild:Windows NT 4.0" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT50Display" MultiBuildValue="DefaultBuild:Windows 2000" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5X" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
<ROW Property="WindowsTypeNT5XDisplay" MultiBuildValue="DefaultBuild:Windows XP/2003" ValueLocId="-"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiDirsComponent">
<ROW Directory="AI_Bin32_Dir" Directory_Parent="APPDIR" DefaultDir="32-bit"/>
<ROW Directory="APPDIR" Directory_Parent="TARGETDIR" DefaultDir="APPDIR:." IsPseudoRoot="1"/>
<ROW Directory="SHORTCUTDIR" Directory_Parent="TARGETDIR" DefaultDir="SHORTC~1|SHORTCUTDIR" IsPseudoRoot="1"/>
<ROW Directory="TARGETDIR" DefaultDir="SourceDir"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCompsComponent">
<ROW Component="AI_ExePath" ComponentId="{756493E7-566A-49DE-8EC3-07AE9D1BD9C4}" Directory_="APPDIR" Attributes="4" KeyPath="AI_ExePath"/>
<ROW Component="APPDIR" ComponentId="{947691BF-6B7F-4A14-9027-3E1ECF87784A}" Directory_="APPDIR" Attributes="0"/>
<ROW Component="ProductInformation" ComponentId="{E2F0A6FF-AB27-4BBA-AF65-9D70B244A328}" Directory_="APPDIR" Attributes="4" KeyPath="Version"/>
<ROW Component="ViGEmBus.pdb" ComponentId="{2BD2B055-FC59-4343-AEA0-C2C7948101B3}" Directory_="APPDIR" Attributes="256" Condition="VersionNT64" KeyPath="ViGEmBus.pdb" Type="4"/>
<ROW Component="ViGEmBus.pdb_1" ComponentId="{C14BA15C-3FE5-4BEA-A343-284469DE22F5}" Directory_="AI_Bin32_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="ViGEmBus.pdb_1" Type="4"/>
<ROW Component="ViGEmBus.sys" ComponentId="{DA974243-DAFB-49CF-8693-FF51C234CBD5}" Directory_="APPDIR" Attributes="256" Condition="VersionNT64" KeyPath="ViGEmBus.sys" Type="0"/>
<ROW Component="nefconw.exe" ComponentId="{AEADABD6-0FA7-4BF5-A3F5-1043F5D911F9}" Directory_="APPDIR" Attributes="256" Condition="VersionNT64" KeyPath="nefconw.exe"/>
<ROW Component="nefconw.exe_1" ComponentId="{E0BCC5D1-4762-490A-AD7E-9A36C8DF724C}" Directory_="AI_Bin32_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="nefconw.exe_1"/>
<ROW Component="updater.exe" ComponentId="{08EB2B6D-47C1-4EED-8A5C-FF31B6F28651}" Directory_="APPDIR" Attributes="0" KeyPath="updater.exe"/>
<ROW Component="vigembus.cat" ComponentId="{CEA011F4-933A-459C-B951-B1BC17E4E671}" Directory_="AI_Bin32_Dir" Attributes="0" Condition="NOT VersionNT64" KeyPath="vigembus.cat_1" Type="0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatsComponent">
<ROW Feature="AI32BitFiles" Title="32-bit" Description="32-bit Executables and Libraries" Display="5" Level="1" Directory_="APPDIR" Attributes="0"/>
<ROW Feature="AI64BitFiles" Title="64-bit" Description="64-bit Executables and Libraries" Display="3" Level="1" Directory_="APPDIR" Attributes="0"/>
<ROW Feature="MainFeature" Title="MainFeature" Description="Description" Display="1" Level="1" Directory_="APPDIR" Attributes="0"/>
<ATTRIBUTE name="CurrentFeature" value="MainFeature"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFilesComponent">
<ROW File="nefconw.exe" Component_="nefconw.exe" FileName="nefconw.exe" Attributes="0" SourcePath="..\drivers\x64\nefconw.exe" SelfReg="false"/>
<ROW File="ViGEmBus.sys" Component_="ViGEmBus.sys" FileName="ViGEmBus.sys" Attributes="0" SourcePath="..\drivers\x64\ViGEmBus.sys" SelfReg="false"/>
<ROW File="vigembus.cat" Component_="ViGEmBus.sys" FileName="vigembus.cat" Attributes="0" SourcePath="..\drivers\x64\vigembus.cat" SelfReg="false"/>
<ROW File="ViGEmBus.inf" Component_="ViGEmBus.sys" FileName="ViGEmBus.inf" Attributes="0" SourcePath="..\drivers\x64\ViGEmBus.inf" SelfReg="false"/>
<ROW File="ViGEmBus.pdb" Component_="ViGEmBus.pdb" FileName="ViGEmBus.pdb" Attributes="0" SourcePath="..\drivers\x64\ViGEmBus.pdb" SelfReg="false"/>
<ROW File="LICENSE" Component_="ViGEmBus.sys" FileName="LICENSE" Attributes="0" SourcePath="..\drivers\x64\LICENSE" SelfReg="false"/>
<ROW File="nefconw.exe_1" Component_="nefconw.exe_1" FileName="nefconw.exe" Attributes="0" SourcePath="..\drivers\x86\nefconw.exe" SelfReg="false"/>
<ROW File="vigembus.cat_1" Component_="vigembus.cat" FileName="vigembus.cat" Attributes="0" SourcePath="..\drivers\x86\vigembus.cat" SelfReg="false"/>
<ROW File="ViGEmBus.inf_1" Component_="vigembus.cat" FileName="ViGEmBus.inf" Attributes="0" SourcePath="..\drivers\x86\ViGEmBus.inf" SelfReg="false"/>
<ROW File="ViGEmBus.pdb_1" Component_="ViGEmBus.pdb_1" FileName="ViGEmBus.pdb" Attributes="0" SourcePath="..\drivers\x86\ViGEmBus.pdb" SelfReg="false"/>
<ROW File="ViGEmBus.sys_1" Component_="vigembus.cat" FileName="ViGEmBus.sys" Attributes="0" SourcePath="..\drivers\x86\ViGEmBus.sys" SelfReg="false"/>
<ROW File="LICENSE_1" Component_="vigembus.cat" FileName="LICENSE" Attributes="0" SourcePath="..\drivers\x86\LICENSE" SelfReg="false"/>
<ROW File="updater.exe" Component_="updater.exe" FileName="VIGEMB~1.EXE|ViGEmBus_Updater.exe" Version="65535.65535.65535.65535" Attributes="0" SourcePath="&lt;AI_STUBS&gt;updater.exe" SelfReg="false" DigSign="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BootstrOptComponent">
<ROW BootstrOptKey="GlobalOptions" DownloadFolder="[AppDataFolder][|Manufacturer]\[|ProductName]\prerequisites" Options="2"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.BuildComponent">
<ROW BuildKey="DefaultBuild" BuildName="DefaultBuild" BuildOrder="1" BuildType="0" PackageFolder="Setup Files" Languages="en_GB" InstallationType="2" CabsLocation="1" CompressCabs="false" UseLzma="true" LzmaMethod="2" LzmaCompressionLevel="4" PackageType="1" FilesInsideExe="true" ExeIconPath="ViGEm.ico" ExtractionFolder="[AppDataFolder][|Manufacturer]\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="ViGEmBus_[|ProductVersion]_x64_x86" MsiPackageType="AI_ALL"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
<ROW Path="&lt;AI_DICTS&gt;ui.ail"/>
<ROW Path="&lt;AI_DICTS&gt;ui_en_GB.ail"/>
<ROW Path="&lt;AI_DICTS&gt;ui_en.ail"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.DigCertStoreComponent">
<ROW TimeStampUrl="http://timestamp.digicert.com" SignerDescription="[|ProductName]" SignOptions="7" SignTool="0" UseSha256="1" Thumbprint="f88a20d1f8f87c188c7b7d65a1f897332b26cae6 Subject: Nefarius Software Solutions e.U.&#10;Issuer: DigiCert Global G3 Code Signing ECC SHA384 2021 CA1&#10;Valid from 11/25/2021 to 02/13/2025&#10;User\MY" Subject="CN=Nefarius Software Solutions e.U., O=Nefarius Software Solutions e.U., L=Wels, C=AT, SERIALNUMBER=505039f, OID.1.3.6.1.4.1.311.60.2.1.1=Wels, OID.1.3.6.1.4.1.311.60.2.1.2=Oberösterreich, OID.1.3.6.1.4.1.311.60.2.1.3=AT, OID.2.5.4.15=Private Organization"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.FragmentComponent">
<ROW Fragment="CommonUI.aip" Path="&lt;AI_FRAGS&gt;CommonUI.aip"/>
<ROW Fragment="InstallDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\InstallDlg.aip"/>
<ROW Fragment="LicenseAgreementDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\LicenseAgreementDlg.aip"/>
<ROW Fragment="MaintenanceTypeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceTypeDlg.aip"/>
<ROW Fragment="MaintenanceWelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\MaintenanceWelcomeDlg.aip"/>
<ROW Fragment="SequenceDialogs.aip" Path="&lt;AI_THEMES&gt;classic\fragments\SequenceDialogs.aip"/>
<ROW Fragment="Sequences.aip" Path="&lt;AI_FRAGS&gt;Sequences.aip"/>
<ROW Fragment="StaticUIStrings.aip" Path="&lt;AI_FRAGS&gt;StaticUIStrings.aip"/>
<ROW Fragment="Themes.aip" Path="&lt;AI_FRAGS&gt;Themes.aip"/>
<ROW Fragment="UI.aip" Path="&lt;AI_THEMES&gt;classic\fragments\UI.aip"/>
<ROW Fragment="Validation.aip" Path="&lt;AI_FRAGS&gt;Validation.aip"/>
<ROW Fragment="VerifyRemoveDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRemoveDlg.aip"/>
<ROW Fragment="VerifyRepairDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\VerifyRepairDlg.aip"/>
<ROW Fragment="WelcomeDlg.aip" Path="&lt;AI_THEMES&gt;classic\fragments\WelcomeDlg.aip"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiActionTextComponent">
<ROW Action="AI_DeleteLzma" Description="Deleting files extracted from archive" DescriptionLocId="ActionText.Description.AI_DeleteLzma" TemplateLocId="-"/>
<ROW Action="AI_DeleteRLzma" Description="Deleting files extracted from archive" DescriptionLocId="ActionText.Description.AI_DeleteLzma" TemplateLocId="-"/>
<ROW Action="AI_ExtractFiles" Description="Extracting files from archive" DescriptionLocId="ActionText.Description.AI_ExtractLzma" TemplateLocId="-"/>
<ROW Action="AI_ExtractLzma" Description="Extracting files from archive" DescriptionLocId="ActionText.Description.AI_ExtractLzma" TemplateLocId="-"/>
<ROW Action="AI_ProcessTasks2" Description="Generating actions to schedule tasks on the local computer:" DescriptionLocId="ActionText.Description.AI_ProcessTasks" Template="Task Name: [1]" TemplateLocId="ActionText.Template.AI_ProcessTasks"/>
<ROW Action="AI_RemoveTasks2" Description="Removing scheduled task from the local computer" DescriptionLocId="ActionText.Description.AI_RemoveTasks" Template="Task Name: [1]" TemplateLocId="ActionText.Template.AI_RemoveTasks"/>
<ROW Action="AI_RollbackTasks2" Description="Rolling back scheduled task on the local computer" DescriptionLocId="ActionText.Description.AI_RollbackTasks" Template="Task Name: [1]" TemplateLocId="ActionText.Template.AI_RollbackTasks"/>
<ROW Action="AI_ScheduleTasks2" Description="Schedule task on the local computer" DescriptionLocId="ActionText.Description.AI_ScheduleTasks" Template="Task Name: [1]" TemplateLocId="ActionText.Template.AI_ScheduleTasks"/>
<ROW Action="AI_UninstallTasks2" Description="Generating actions to remove scheduled tasks from the local computer:" DescriptionLocId="ActionText.Description.AI_UninstallTasks"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiAppSearchComponent">
<ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_LM" Builds="DefaultBuild"/>
<ROW Property="AI_SETUPEXEPATH" Signature_="AI_EXE_PATH_CU" Builds="DefaultBuild"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
<ROW Name="Prereq.dll" SourcePath="&lt;AI_CUSTACTS&gt;Prereq.dll"/>
<ROW Name="aicustact.dll" SourcePath="&lt;AI_CUSTACTS&gt;aicustact.dll"/>
<ROW Name="aischeduler2.dll" SourcePath="&lt;AI_CUSTACTS&gt;aischeduler2.dll"/>
<ROW Name="lzmaextractor.dll" SourcePath="&lt;AI_CUSTACTS&gt;lzmaextractor.dll"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiConditionComponent">
<ROW Feature_="AI64BitFiles" Level="0" Condition="NOT VersionNT64"/>
<ROW Feature_="AI32BitFiles" Level="0" Condition="VersionNT64"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlComponent">
<ROW Dialog_="LicenseAgreementDlg" Control="AgreementText" Type="ScrollableText" X="20" Y="60" Width="330" Height="120" Attributes="7" Order="400" TextLocId="Control.Text.LicenseAgreementDlg#AgreementText" MsiKey="LicenseAgreementDlg#AgreementText"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiControlEventComponent">
<ROW Dialog_="WelcomeDlg" Control_="Next" Event="NewDialog" Argument="InstallDlg" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="MaintenanceWelcomeDlg" Control_="Next" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="99"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_MAINT" Ordering="198"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="203"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_INSTALL" Ordering="197"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="InstallDlg" Condition="AI_INSTALL" Ordering="201"/>
<ROW Dialog_="CustomizeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_MAINT" Ordering="101"/>
<ROW Dialog_="CustomizeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT" Ordering="1"/>
<ROW Dialog_="MaintenanceTypeDlg" Control_="ChangeButton" Event="NewDialog" Argument="CustomizeDlg" Condition="AI_MAINT" Ordering="501"/>
<ROW Dialog_="MaintenanceTypeDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceWelcomeDlg" Condition="AI_MAINT" Ordering="1"/>
<ROW Dialog_="MaintenanceTypeDlg" Control_="RemoveButton" Event="NewDialog" Argument="VerifyRemoveDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="601"/>
<ROW Dialog_="VerifyRemoveDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="1"/>
<ROW Dialog_="MaintenanceTypeDlg" Control_="RepairButton" Event="NewDialog" Argument="VerifyRepairDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="601"/>
<ROW Dialog_="VerifyRepairDlg" Control_="Back" Event="NewDialog" Argument="MaintenanceTypeDlg" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="1"/>
<ROW Dialog_="VerifyRepairDlg" Control_="Repair" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Repair&quot;" Ordering="399" Options="1"/>
<ROW Dialog_="VerifyRemoveDlg" Control_="Remove" Event="EndDialog" Argument="Return" Condition="AI_MAINT AND InstallMode=&quot;Remove&quot;" Ordering="299" Options="1"/>
<ROW Dialog_="PatchWelcomeDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_PATCH" Ordering="201"/>
<ROW Dialog_="ResumeDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_RESUME" Ordering="299"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Install" Event="EndDialog" Argument="Return" Condition="AI_PATCH" Ordering="199"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="PatchWelcomeDlg" Condition="AI_PATCH" Ordering="204"/>
<ROW Dialog_="InstallDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL" Ordering="201"/>
<ROW Dialog_="InstallDlg" Control_="Back" Event="NewDialog" Argument="WelcomeDlg" Condition="AI_INSTALL" Ordering="1"/>
<ROW Dialog_="InstallDlg" Control_="Hyperlink" Event="NewDialog" Argument="LicenseAgreementDlg" Condition="AI_INSTALL AND ReadLicense" Ordering="201"/>
<ROW Dialog_="LicenseAgreementDlg" Control_="Back" Event="NewDialog" Argument="InstallDlg" Condition="AI_INSTALL AND ReadLicense" Ordering="1"/>
<ROW Dialog_="LicenseAgreementDlg" Control_="Next" Event="NewDialog" Argument="VerifyReadyDlg" Condition="AI_INSTALL AND ReadLicense" Ordering="1"/>
<ROW Dialog_="VerifyReadyDlg" Control_="Back" Event="NewDialog" Argument="LicenseAgreementDlg" Condition="AI_INSTALL AND ReadLicense" Ordering="202"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCreateFolderComponent">
<ROW Directory_="APPDIR" Component_="APPDIR" ManualDelete="true"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiCustActComponent">
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH_ORIGINAL" Target="[AI_SETUPEXEPATH]"/>
<ROW Action="AI_DATA_SETTER" Type="51" Source="CustomActionData" Target="[AI_SETUPEXEPATH]"/>
<ROW Action="AI_DOWNGRADE" Type="19" Target="4010"/>
<ROW Action="AI_DeleteCadLzma" Type="51" Source="AI_DeleteLzma" Target="[AI_SETUPEXEPATH]"/>
<ROW Action="AI_DeleteLzma" Type="1025" Source="lzmaextractor.dll" Target="DeleteLZMAFiles"/>
<ROW Action="AI_DeleteRCadLzma" Type="51" Source="AI_DeleteRLzma" Target="[AI_SETUPEXEPATH]"/>
<ROW Action="AI_DeleteRLzma" Type="1281" Source="lzmaextractor.dll" Target="DeleteLZMAFiles"/>
<ROW Action="AI_DpiContentScale" Type="1" Source="aicustact.dll" Target="DpiContentScale"/>
<ROW Action="AI_EnableDebugLog" Type="321" Source="aicustact.dll" Target="EnableDebugLog"/>
<ROW Action="AI_ExtractCadLzma" Type="51" Source="AI_ExtractLzma" Target="[AI_SETUPEXEPATH]"/>
<ROW Action="AI_ExtractFiles" Type="1" Source="Prereq.dll" Target="ExtractSourceFiles" AdditionalSeq="AI_DATA_SETTER"/>
<ROW Action="AI_ExtractLzma" Type="1025" Source="lzmaextractor.dll" Target="ExtractLZMAFiles"/>
<ROW Action="AI_FindExeLzma" Type="1" Source="lzmaextractor.dll" Target="FindEXE"/>
<ROW Action="AI_InstallModeCheck" Type="1" Source="aicustact.dll" Target="UpdateInstallMode" WithoutSeq="true"/>
<ROW Action="AI_PREPARE_UPGRADE" Type="65" Source="aicustact.dll" Target="PrepareUpgrade"/>
<ROW Action="AI_ProcessTasks2" Type="1" Source="aischeduler2.dll" Target="ProcessTasks"/>
<ROW Action="AI_REDIRECT_32BIT_FOLDER" Type="51" Source="AI_Bin32_Dir" Target="[APPDIR]"/>
<ROW Action="AI_REDIRECT_32BIT_SH_FOLDER" Type="51" Source="AI_Sh32_Dir" Target="[SHORTCUTDIR]"/>
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Type="51" Source="AI_SETUPEXEPATH" Target="[AI_SETUPEXEPATH_ORIGINAL]"/>
<ROW Action="AI_RESTORE_LOCATION" Type="65" Source="aicustact.dll" Target="RestoreLocation"/>
<ROW Action="AI_RemoveTasks2" Type="11265" Source="aischeduler2.dll" Target="DeleteTasks" WithoutSeq="true"/>
<ROW Action="AI_ResolveKnownFolders" Type="1" Source="aicustact.dll" Target="AI_ResolveKnownFolders"/>
<ROW Action="AI_RollbackTasks2" Type="11521" Source="aischeduler2.dll" Target="DeleteTasks" WithoutSeq="true"/>
<ROW Action="AI_SETPROGRAMFILES" Type="51" Source="AI_ProgramFiles" Target="[ProgramFilesFolder]"/>
<ROW Action="AI_SETPROGRAMFILES64" Type="51" Source="AI_ProgramFiles" Target="[ProgramFiles64Folder]"/>
<ROW Action="AI_SHOW_LOG" Type="65" Source="aicustact.dll" Target="LaunchLogFile" WithoutSeq="true"/>
<ROW Action="AI_STORE_LOCATION" Type="51" Source="ARPINSTALLLOCATION" Target="[APPDIR]"/>
<ROW Action="AI_ScheduleTasks2" Type="11265" Source="aischeduler2.dll" Target="ScheduleTasks" WithoutSeq="true"/>
<ROW Action="AI_UPDATER_UNINSTALL" Type="82" Source="updater.exe" Target="/clean silent"/>
<ROW Action="AI_UninstallTasks2" Type="1" Source="aischeduler2.dll" Target="UninstallTasks"/>
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[AI_ProgramFiles]Nefarius Software Solutions\[ProductName]"/>
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]"/>
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
<ROW Action="x64_AddDeviceNode" Type="1106" Source="nefconw.exe" Target="--create-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-name System --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x64_InstallDriver" Type="1106" Source="nefconw.exe" Target="--install-driver --inf-path &quot;[#ViGEmBus.inf]&quot;"/>
<ROW Action="x64_UninstallDevice" Type="1106" Source="nefconw.exe" Target="--remove-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x64_UninstallDevice_Old" Type="1106" Source="nefconw.exe" Target="--remove-device-node --hardware-id Root\ViGEmBus --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x64_UninstallDriver" Type="1106" Source="nefconw.exe" Target="--uninstall-driver --inf-path &quot;[#ViGEmBus.inf]&quot;"/>
<ROW Action="x86_AddDeviceNode" Type="1106" Source="nefconw.exe_1" Target="--create-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-name System --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x86_InstallDriver" Type="1106" Source="nefconw.exe_1" Target="--install-driver --inf-path &quot;[#ViGEmBus.inf_1]&quot;"/>
<ROW Action="x86_UninstallDevice" Type="1106" Source="nefconw.exe_1" Target="--remove-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x86_UninstallDevice_Old" Type="1106" Source="nefconw.exe_1" Target="--remove-device-node --hardware-id Root\ViGEmBus --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
<ROW Action="x86_UninstallDriver" Type="1106" Source="nefconw.exe_1" Target="--uninstall-driver --inf-path &quot;[#ViGEmBus.inf]&quot;"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiFeatCompsComponent">
<ROW Feature_="MainFeature" Component_="APPDIR"/>
<ROW Feature_="MainFeature" Component_="ProductInformation"/>
<ROW Feature_="MainFeature" Component_="AI_ExePath"/>
<ROW Feature_="AI64BitFiles" Component_="nefconw.exe"/>
<ROW Feature_="AI64BitFiles" Component_="ViGEmBus.sys"/>
<ROW Feature_="AI64BitFiles" Component_="ViGEmBus.pdb"/>
<ROW Feature_="AI32BitFiles" Component_="nefconw.exe_1"/>
<ROW Feature_="AI32BitFiles" Component_="vigembus.cat"/>
<ROW Feature_="AI32BitFiles" Component_="ViGEmBus.pdb_1"/>
<ROW Feature_="MainFeature" Component_="updater.exe"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
<ROW Name="ViGEm.exe" SourcePath="ViGEm.ico" Index="0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiIniFileComponent">
<ROW IniFile="AppDir" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="AppDir" Value="[APPDIR]" Action="0" Component_="updater.exe"/>
<ROW IniFile="ApplicationName" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="ApplicationName" Value="[ProductName]" Action="0" Component_="updater.exe"/>
<ROW IniFile="ApplicationVersion" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="ApplicationVersion" Value="[ProductVersion]" Action="0" Component_="updater.exe"/>
<ROW IniFile="CheckFrequency" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="CheckFrequency" Value="2" Action="0" Component_="updater.exe"/>
<ROW IniFile="CompanyName" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="CompanyName" Value="[Manufacturer]" Action="0" Component_="updater.exe"/>
<ROW IniFile="DefaultCommandLine" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="DefaultCommandLine" Value="/checknow" Action="0" Component_="updater.exe"/>
<ROW IniFile="DownloadsFolder" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="DownloadsFolder" Value="[CommonAppDataFolder][Manufacturer]\[ProductName]\updates\" Action="0" Component_="updater.exe"/>
<ROW IniFile="Flags" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="Flags" Value="PerMachine|ShowConfigOptionsButton" Action="0" Component_="updater.exe"/>
<ROW IniFile="ID" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="ID" Value="[UpgradeCode]" Action="0" Component_="updater.exe"/>
<ROW IniFile="URL" FileName="VIGEMB~1.INI|ViGEmBus_Updater.ini" DirProperty="APPDIR" Section="General" Key="URL" Value="https://updates.vigem.org/api/github/ViGEm/ViGEmBus/updates" Action="0" Component_="updater.exe"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel &lt;&gt; 5)" Sequence="210"/>
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="747"/>
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1508"/>
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE=&quot;No&quot; AND (Not Installed)" Sequence="1397"/>
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Sequence="99" Builds="DefaultBuild"/>
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101" Builds="DefaultBuild"/>
<ROW Action="AI_DeleteCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="199" Builds="DefaultBuild"/>
<ROW Action="AI_DeleteRCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="198" Builds="DefaultBuild"/>
<ROW Action="AI_ExtractCadLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="197" Builds="DefaultBuild"/>
<ROW Action="AI_FindExeLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="196" Builds="DefaultBuild"/>
<ROW Action="AI_ExtractLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="1549" Builds="DefaultBuild"/>
<ROW Action="AI_DeleteRLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="1548" Builds="DefaultBuild"/>
<ROW Action="AI_DeleteLzma" Condition="SETUPEXEDIR=&quot;&quot; AND Installed AND (REMOVE&lt;&gt;&quot;ALL&quot;) AND (AI_INSTALL_MODE&lt;&gt;&quot;Remove&quot;) AND (NOT PATCH)" Sequence="6599" Builds="DefaultBuild"/>
<ROW Action="AI_ExtractFiles" Sequence="1399" Builds="DefaultBuild"/>
<ROW Action="AI_DATA_SETTER" Sequence="1398"/>
<ROW Action="AI_REDIRECT_32BIT_FOLDER" Condition="NOT VersionNT64 AND NOT AI_Disable32BitRedirection" Sequence="798"/>
<ROW Action="AI_REDIRECT_32BIT_SH_FOLDER" Condition="NOT VersionNT64 AND NOT AI_Disable32BitRedirection" Sequence="799"/>
<ROW Action="AI_SETPROGRAMFILES64" Condition="VersionNT64" Sequence="748"/>
<ROW Action="AI_SETPROGRAMFILES" Condition="NOT VersionNT64" Sequence="749"/>
<ROW Action="AI_UPDATER_UNINSTALL" Condition="($updater.exe = 2) AND (?updater.exe = 3) AND NOT (UPGRADINGPRODUCTCODE)" Sequence="1551"/>
<ROW Action="AI_ProcessTasks2" Condition="(VersionNT &gt;= 600) AND (REMOVE&lt;&gt;&quot;ALL&quot;)" Sequence="1624"/>
<ROW Action="AI_UninstallTasks2" Condition="(VersionNT &gt;= 600) AND (REMOVE=&quot;ALL&quot;)" Sequence="1699"/>
<ROW Action="ForceReboot" Condition="AI_UPGRADE&lt;&gt;&quot;No&quot; AND OLDPRODUCTS AND AFTERREBOOT&lt;&gt;1" Sequence="1501" SeqType="0"/>
<ROW Action="x64_AddDeviceNode" Condition="( NOT Installed ) AND ( VersionNT64 )" Sequence="6401"/>
<ROW Action="x64_InstallDriver" Condition="( NOT Installed ) AND ( VersionNT64 )" Sequence="6403"/>
<ROW Action="x64_UninstallDevice_Old" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( VersionNT64 )" Sequence="1502"/>
<ROW Action="x64_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( VersionNT64 )" Sequence="1504"/>
<ROW Action="x64_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( VersionNT64 )" Sequence="1506"/>
<ROW Action="x86_UninstallDevice_Old" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( NOT VersionNT64 )" Sequence="1503"/>
<ROW Action="x86_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( NOT VersionNT64 )" Sequence="1505"/>
<ROW Action="x86_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = &quot;ALL&quot; OR AI_INSTALL_MODE = &quot;Remove&quot; ) ) ) AND ( NOT VersionNT64 )" Sequence="1507"/>
<ROW Action="x86_AddDeviceNode" Condition="( NOT Installed ) AND ( NOT VersionNT64 )" Sequence="6402"/>
<ROW Action="x86_InstallDriver" Condition="( NOT Installed ) AND ( NOT VersionNT64 )" Sequence="6404"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=&quot;&quot;" Sequence="747"/>
<ROW Action="AI_ResolveKnownFolders" Sequence="53"/>
<ROW Action="AI_DpiContentScale" Sequence="52"/>
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
<ROW Action="AI_BACKUP_AI_SETUPEXEPATH" Sequence="99"/>
<ROW Action="AI_RESTORE_AI_SETUPEXEPATH" Condition="AI_SETUPEXEPATH_ORIGINAL" Sequence="101"/>
<ROW Action="AI_SETPROGRAMFILES64" Condition="VersionNT64" Sequence="748"/>
<ROW Action="AI_SETPROGRAMFILES" Condition="NOT VersionNT64" Sequence="749"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
<ROW Condition="((VersionNT &lt;&gt; 501) AND (VersionNT &lt;&gt; 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="(VersionNT &lt;&gt; 400)" Description="[ProductName] can not be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="(VersionNT &lt;&gt; 500)" Description="[ProductName] can not be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="SETUPEXEDIR OR (REMOVE=&quot;ALL&quot;)" Description="This package can only be run from a bootstrapper." DescriptionLocId="AI.LaunchCondition.RequireBootstrapper" IsPredefined="true" Builds="DefaultBuild"/>
<ROW Condition="VersionNT" Description="[ProductName] can not be installed on [WindowsType9XDisplay]." DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">
<ROW Signature_="AI_EXE_PATH_CU" Root="1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Type="2"/>
<ROW Signature_="AI_EXE_PATH_LM" Root="2" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Type="2"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
<ROW Registry="AI_ExePath" Root="-1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="AI_ExePath" Value="[AI_SETUPEXEPATH]" Component_="AI_ExePath"/>
<ROW Registry="AdvancedInstaller" Root="-1" Key="Software\Caphyon\Advanced Installer" Name="\"/>
<ROW Registry="Caphyon" Root="-1" Key="Software\Caphyon" Name="\"/>
<ROW Registry="LZMA" Root="-1" Key="Software\Caphyon\Advanced Installer\LZMA" Name="\"/>
<ROW Registry="Manufacturer" Root="-1" Key="Software\[Manufacturer]" Name="\"/>
<ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
<ROW Registry="ProductCode" Root="-1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]" Name="\"/>
<ROW Registry="ProductName" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="\"/>
<ROW Registry="ProductVersion" Root="-1" Key="Software\Caphyon\Advanced Installer\LZMA\[ProductCode]\[ProductVersion]" Name="\"/>
<ROW Registry="Software" Root="-1" Key="Software" Name="\"/>
<ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiThemeComponent">
<ATTRIBUTE name="UsedTheme" value="classic"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/>
<ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
<ROW UpgradeCode="{0A4A02DE-0BE3-4BF4-91F0-1EA47AD26881}" VersionMax="1.17.333.0" Attributes="1541" ActionProperty="UPGRADE_1"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.ScheduledTasksComponent">
<ROW TaskId="AI_ViGEmBus_Updater" TaskName="ViGEmBus_Updater" Run="[#updater.exe]" CmdLine="/silent" WorkDir="[APPDIR]" UserProp="[%UserDomain]\[LogonUser]" Flags="24576" Trigger="1|1|1|1|0|0|0||0|0" Settings="2|4320" Condition="1" TaskVersion="2.0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.UpdaterComponent">
<ROW Updater="updater.exe" URL="URL" SearchFreq="CheckFrequency" DownloadsFolder="DownloadsFolder" ID="ID" TargetDir="AppDir" AppName="ApplicationName" AppVersion="ApplicationVersion" CompanyName="CompanyName" DefCommandLine="DefaultCommandLine" Flags="Flags" IconPath="ViGEm.ico" IconIndex="0" UnistallCASeq="AI_UPDATER_UNINSTALL" TaskId="AI_ViGEmBus_Updater" Description="[|UpdaterName] [|ProductVersion]"/>
</COMPONENT>
</DOCUMENT>

123
stage0.ps1 Normal file
View File

@@ -0,0 +1,123 @@
Param(
[Parameter(Mandatory=$true)]
[string]$BuildVersion,
[Parameter(Mandatory=$true)]
[string]$Token,
[Parameter(Mandatory=$false)]
[string]$Path = "./artifacts",
[Parameter(Mandatory=$false)]
[Switch]$NoSigning
) #end param
$signTool = "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe"
$timestampUrl = "http://timestamp.digicert.com"
$certName = "Nefarius Software Solutions e.U."
function Get-AppVeyorArtifacts
{
[CmdletBinding(SupportsShouldProcess = $true, ConfirmImpact = 'Low')]
param(
#The name of the account you wish to download artifacts from
[parameter(Mandatory = $true)]
[string]$Account,
#The name of the project you wish to download artifacts from
[parameter(Mandatory = $true)]
[string]$Project,
#Where to save the downloaded artifacts. Defaults to current directory.
[alias("DownloadDirectory")][string]$Path = '.',
[string]$Token,
#Filter to a specific branch or project directory. You can specify Branch as either branch name ("master") or build version ("0.1.29")
[string]$Branch,
#If you have multiple build jobs, specify which job you wish to retrieve the artifacts from
[string]$JobName,
#Download all files into a single directory, do not preserve any hierarchy that might exist in the artifacts
[switch]$Flat,
[string]$Proxy,
[switch]$ProxyUseDefaultCredentials,
#URL of Appveyor API. You normally shouldn't need to change this.
$apiUrl = 'https://ci.appveyor.com/api'
)
$headers = @{
'Content-type' = 'application/json'
}
if ($Token) {$headers.'Authorization' = "Bearer $token"}
# Prepare proxy args to splat to Invoke-RestMethod
$proxyArgs = @{}
if (-not [string]::IsNullOrEmpty($proxy)) {
$proxyArgs.Add('Proxy', $proxy)
}
if ($proxyUseDefaultCredentials.IsPresent) {
$proxyArgs.Add('ProxyUseDefaultCredentials', $proxyUseDefaultCredentials)
}
$errorActionPreference = 'Stop'
$projectURI = "$apiUrl/projects/$account/$project"
if ($Branch) {$projectURI = $projectURI + "/build/$Branch"}
$projectObject = Invoke-RestMethod -Method Get -Uri $projectURI `
-Headers $headers @proxyArgs
if (-not $projectObject.build.jobs) {throw "No jobs found for this project or the project and/or account name was incorrectly specified"}
if (($projectObject.build.jobs.count -gt 1) -and -not $jobName) {
throw "Multiple Jobs found for the latest build. Please specify the -JobName paramter to select which job you want the artifacts for"
}
if ($JobName) {
$jobid = ($projectObject.build.jobs | Where-Object name -eq "$JobName" | Select-Object -first 1).jobid
if (-not $jobId) {throw "Unable to find a job named $JobName within the latest specified build. Did you spell it correctly?"}
} else {
$jobid = $projectObject.build.jobs[0].jobid
}
$artifacts = Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts" `
-Headers $headers @proxyArgs
$artifacts `
| ? { $psCmdlet.ShouldProcess($_.fileName) } `
| % {
$type = $_.type
$localArtifactPath = $_.fileName -split '/' | % { [Uri]::UnescapeDataString($_) }
if ($flat.IsPresent) {
$localArtifactPath = ($localArtifactPath | select -Last 1)
} else {
$localArtifactPath = $localArtifactPath -join [IO.Path]::DirectorySeparatorChar
}
$localArtifactPath = Join-Path $path $localArtifactPath
$artifactUrl = "$apiUrl/buildjobs/$jobId/artifacts/$($_.fileName)"
Write-Verbose "Downloading $artifactUrl to $localArtifactPath"
New-Item -ItemType Directory -Force -Path (Split-Path -Path $localArtifactPath) | Out-Null
Invoke-RestMethod -Method Get -Uri $artifactUrl -OutFile $localArtifactPath -Headers $headers @proxyArgs
New-Object PSObject -Property @{
'Source' = $artifactUrl
'Type' = $type
'Target' = $localArtifactPath
}
}
}
# Download x64 binaries
Get-AppVeyorArtifacts -Account "nefarius" -Project "ViGemBus" -Path $Path -Token $Token -Branch $BuildVersion -JobName "Platform: x64"
# Download x86 binaries
Get-AppVeyorArtifacts -Account "nefarius" -Project "ViGemBus" -Path $Path -Token $Token -Branch $BuildVersion -JobName "Platform: x86"
# List of files to sign
$files = "`".\artifacts\disk1\*.cab`" "
if ($NoSigning -eq $false) {
# sign with only one certificate
Invoke-Expression "& `"$signTool`" sign /v /as /n `"$certName`" /tr $timestampUrl /fd sha256 /td sha256 $files"
}
# Print helper job names for sign portal
"ViGemBus x86 v$BuildVersion $(Get-Date -Format "dd.MM.yyyy")"
"ViGemBus x64 v$BuildVersion $(Get-Date -Format "dd.MM.yyyy")"

View File

@@ -1,9 +0,0 @@
//
// Don't compile in verbose tracing on release builds
//
#ifndef DBG
#ifdef TraceDbg
#undef TraceDbg
#define TraceDbg(...) { /* nothing to see here :) */ };
#endif
#endif

20
sys/Dmf.props Normal file
View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_PropertySheetDisplayName>Driver Module Framework</_PropertySheetDisplayName>
<!-- By default, look for DMF in parent root directory, otherwise use environment variable value -->
<DmfRootPath Condition="'$(DmfRootPath)' == ''">$(SolutionDir)..\</DmfRootPath>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(DmfRootPath)\DMF\Modules.Library;$(DmfRootPath)\DMF\Modules.Template;$(DmfRootPath)\DMF\Modules.Library.Tests;$(DmfRootPath)\DMF\Framework;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies Condition="'$(DriverType)'=='KMDF'">$(DmfRootPath)\$(Configuration)\$(PlatformName)\lib\DmfK\DmfK.lib;$(DmfRootPath)\$(Configuration)\$(PlatformName)\individual_libs\DmfKModules.Template\DmfKModules.Template.lib;%(AdditionalDependencies);</AdditionalDependencies>
<AdditionalDependencies Condition="'$(DriverType)'=='UMDF'">$(DmfRootPath)\$(Configuration)\$(PlatformName)\lib\DmfU\DmfU.lib;$(DmfRootPath)\$(Configuration)\$(PlatformName)\individual_libs\DmfUModules.Template\DmfUModules.Template.lib;%(AdditionalDependencies);</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup />
</Project>

View File

@@ -51,8 +51,6 @@
#include "XusbPdo.hpp"
#include "Ds4Pdo.hpp"
#include "Debugging.hpp"
using ViGEm::Bus::Core::PDO_IDENTIFICATION_DESCRIPTION;
using ViGEm::Bus::Core::EmulationTargetPDO;
using ViGEm::Bus::Targets::EmulationTargetXUSB;
@@ -147,7 +145,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
if (deviceAlreadyExists)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"Device with interface GUID {%!GUID!} already exists (%ws)",
&GUID_DEVINTERFACE_BUSENUM_VIGEM,
@@ -201,7 +199,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"WdfDeviceCreate failed with status %!STATUS!",
status);
@@ -211,7 +209,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
pFDOData = FdoGetData(device);
if (pFDOData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"FdoGetData failed");
return STATUS_UNSUCCESSFUL;
@@ -234,7 +232,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"WdfIoQueueCreate failed with status %!STATUS!",
status);
@@ -249,7 +247,7 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"WdfDeviceCreateDeviceInterface failed with status %!STATUS!",
status);
@@ -300,7 +298,7 @@ Bus_DeviceFileCreate(
if (pFileData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"FileObjectGetData failed to return file object from WDFFILEOBJECT 0x%p",
FileObject);
@@ -310,7 +308,7 @@ Bus_DeviceFileCreate(
pFDOData = FdoGetData(Device);
if (pFDOData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"FdoGetData failed");
status = STATUS_NO_SUCH_DEVICE;
@@ -364,7 +362,7 @@ Bus_FileClose(
pFileData = FileObjectGetData(FileObject);
if (pFileData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"FileObjectGetData failed to return file object from WDFFILEOBJECT 0x%p",
FileObject);
@@ -376,7 +374,7 @@ Bus_FileClose(
pFDOData = FdoGetData(device);
if (pFDOData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"FdoGetData failed");
status = STATUS_NO_SUCH_DEVICE;
@@ -408,7 +406,7 @@ Bus_FileClose(
break;
}
//TraceEvents(TRACE_LEVEL_VERBOSE,
//TraceVerbose(
// TRACE_DRIVER,
// "PDO properties: status = %!STATUS!, pdoPID = %d, curPID = %d, pdoSID = %d, curSID = %d, internal = %d",
// (int)childInfo.Status,
@@ -432,7 +430,7 @@ Bus_FileClose(
status = WdfChildListUpdateChildDescriptionAsMissing(list, &description.Header);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DRIVER,
"WdfChildListUpdateChildDescriptionAsMissing failed with status %!STATUS!",
status);

View File

@@ -40,14 +40,12 @@
#define NTSTRSAFE_LIB
#include <ntstrsafe.h>
#include "Debugging.hpp"
PCWSTR ViGEm::Bus::Targets::EmulationTargetDS4::_deviceDescription = L"Virtual DualShock 4 Controller";
ViGEm::Bus::Targets::EmulationTargetDS4::EmulationTargetDS4(ULONG Serial, LONG SessionId, USHORT VendorId,
USHORT ProductId) : EmulationTargetPDO(
Serial, SessionId, VendorId, ProductId)
USHORT ProductId) : EmulationTargetPDO(
Serial, SessionId, VendorId, ProductId)
{
this->_TargetType = DualShock4Wired;
this->_UsbConfigurationDescriptionSize = DS4_DESCRIPTOR_SIZE;
@@ -74,7 +72,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = RtlUnicodeStringInit(DeviceDescription, _deviceDescription);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"RtlUnicodeStringInit failed with status %!STATUS!",
status);
@@ -88,7 +86,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = WdfPdoInitAddHardwareID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"WdfPdoInitAddHardwareID failed with status %!STATUS!",
status);
@@ -103,7 +101,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = WdfPdoInitAddHardwareID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"WdfPdoInitAddHardwareID failed with status %!STATUS!",
status);
@@ -116,7 +114,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"WdfPdoInitAddCompatibleID (#01) failed with status %!STATUS!",
status);
@@ -128,7 +126,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"WdfPdoInitAddCompatibleID (#02) failed with status %!STATUS!",
status);
@@ -140,7 +138,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoPrepareDevice(PWDFDEVICE_IN
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_DS4,
"WdfPdoInitAddCompatibleID (#03) failed with status %!STATUS!",
status);
@@ -202,10 +200,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfTimerCreate failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfTimerCreate failed with status %!STATUS!",
status);
return status;
}
@@ -226,10 +224,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfDriverOpenParametersRegistryKey failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfDriverOpenParametersRegistryKey failed with status %!STATUS!",
status);
return status;
}
@@ -246,10 +244,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
return status;
}
@@ -266,10 +264,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
return status;
}
@@ -287,10 +285,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfRegistryCreateKey failed with status %!STATUS!",
status);
return status;
}
@@ -306,14 +304,14 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
TraceEvents(TRACE_LEVEL_INFORMATION,
TRACE_DS4,
"MAC-Address: %02X:%02X:%02X:%02X:%02X:%02X\n",
this->_TargetMacAddress.Vendor0,
this->_TargetMacAddress.Vendor1,
this->_TargetMacAddress.Vendor2,
this->_TargetMacAddress.Nic0,
this->_TargetMacAddress.Nic1,
this->_TargetMacAddress.Nic2);
TRACE_DS4,
"MAC-Address: %02X:%02X:%02X:%02X:%02X:%02X\n",
this->_TargetMacAddress.Vendor0,
this->_TargetMacAddress.Vendor1,
this->_TargetMacAddress.Vendor2,
this->_TargetMacAddress.Nic0,
this->_TargetMacAddress.Nic1,
this->_TargetMacAddress.Nic2);
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
{
@@ -328,19 +326,19 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfRegistryAssignValue failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfRegistryAssignValue failed with status %!STATUS!",
status);
return status;
}
}
else if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_DS4,
"WdfRegistryQueryValue failed with status %!STATUS!",
status);
TraceError(
TRACE_DS4,
"WdfRegistryQueryValue failed with status %!STATUS!",
status);
return status;
}
@@ -430,20 +428,20 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::SelectConfiguration(PURB Urb)
if (Urb->UrbHeader.Length < DS4_CONFIGURATION_SIZE)
{
TraceEvents(TRACE_LEVEL_WARNING,
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Invalid ConfigurationDescriptor");
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Invalid ConfigurationDescriptor");
return STATUS_INVALID_PARAMETER;
}
PUSBD_INTERFACE_INFORMATION pInfo = &Urb->UrbSelectConfiguration.Interface;
TraceEvents(TRACE_LEVEL_VERBOSE,
TRACE_DS4,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
static_cast<int>(pInfo->Length),
static_cast<int>(pInfo->InterfaceNumber),
static_cast<int>(pInfo->AlternateSetting),
pInfo->NumberOfPipes);
TraceVerbose(
TRACE_DS4,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
static_cast<int>(pInfo->Length),
static_cast<int>(pInfo->InterfaceNumber),
static_cast<int>(pInfo->AlternateSetting),
pInfo->NumberOfPipes);
pInfo->Class = 0x03; // HID
pInfo->SubClass = 0x00;
@@ -480,10 +478,10 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbClassInterface(PURB Urb)
{
struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST* pRequest = &Urb->UrbControlVendorClassRequest;
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_CLASS_INTERFACE");
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
">> >> >> TransferFlags = 0x%X, Request = 0x%X, Value = 0x%X, Index = 0x%X, BufLen = %d",
pRequest->TransferFlags,
@@ -499,7 +497,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbClassInterface(PURB Urb)
UCHAR reportId = hid_get_report_id(pRequest);
UCHAR reportType = hid_get_report_type(pRequest);
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
">> >> >> >> GET_REPORT(%d): %d",
reportType, reportId);
@@ -586,7 +584,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbClassInterface(PURB Urb)
UCHAR reportId = hid_get_report_id(pRequest);
UCHAR reportType = hid_get_report_type(pRequest);
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
">> >> >> >> SET_REPORT(%d): %d",
reportType, reportId);
@@ -884,7 +882,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbGetDescriptorFromInterface(
struct _URB_CONTROL_DESCRIPTOR_REQUEST* pRequest = &Urb->UrbControlDescriptorRequest;
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
">> >> >> _URB_CONTROL_DESCRIPTOR_REQUEST: Buffer Length %d",
pRequest->TransferBufferLength);
@@ -912,7 +910,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbSelectInterface(PURB Urb)
NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbGetStringDescriptorType(PURB Urb)
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
"Index = %d",
Urb->UrbControlDescriptorRequest.Index);
@@ -934,7 +932,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbGetStringDescriptorType(PUR
}
case 1:
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
"LanguageId = 0x%X",
Urb->UrbControlDescriptorRequest.LanguageId);
@@ -965,7 +963,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbGetStringDescriptorType(PUR
}
case 2:
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_USBPDO,
"LanguageId = 0x%X",
Urb->UrbControlDescriptorRequest.LanguageId);
@@ -1003,12 +1001,12 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbBulkOrInterruptTransfer(_UR
{
NTSTATUS status = STATUS_SUCCESS;
WDFREQUEST notifyRequest;
// Data coming FROM us TO higher driver
if (pTransfer->TransferFlags & USBD_TRANSFER_DIRECTION_IN
&& pTransfer->PipeHandle == reinterpret_cast<USBD_PIPE_HANDLE>(0xFFFF0084))
{
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> Incoming request, queuing...");
@@ -1046,18 +1044,18 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbBulkOrInterruptTransfer(_UR
notify->Report = this->_OutputReport;
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
sizeof(DS4_REQUEST_NOTIFICATION)
notify,
sizeof(DS4_REQUEST_NOTIFICATION)
);
WdfRequestCompleteWithInformation(notifyRequest, status, notify->Size);
}
else
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_USBPDO,
"WdfRequestRetrieveOutputBuffer failed with status %!STATUS!",
status);
TraceError(
TRACE_USBPDO,
"WdfRequestRetrieveOutputBuffer failed with status %!STATUS!",
status);
}
}
else
@@ -1078,12 +1076,12 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbBulkOrInterruptTransfer(_UR
*static_cast<size_t*>(contextBuffer) = DS4_OUTPUT_BUFFER_LENGTH;
TraceDbg(TRACE_USBPDO, "Queued %Iu bytes", DS4_OUTPUT_BUFFER_LENGTH);
TraceVerbose(TRACE_USBPDO, "Queued %Iu bytes", DS4_OUTPUT_BUFFER_LENGTH);
DMF_BufferQueue_Enqueue(this->_UsbInterruptOutBufferQueue, clientBuffer);
}
}
return status;
}
@@ -1119,9 +1117,9 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::SubmitReportImpl(PVOID NewRepo
{
NTSTATUS status;
WDFREQUEST usbRequest;
/*
* The logic here is unusual to keep backwards compatibility with the
* The logic here is unusual to keep backwards compatibility with the
* original API that didn't allow submitting the full report.
*/
@@ -1150,13 +1148,13 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::SubmitReportImpl(PVOID NewRepo
* Skip first byte as it contains the never changing report ID
*/
//
// "Old" API which only allows to update partial report
//
//
// "Old" API which only allows to update partial report
//
if (pSubmit->Size == sizeof(DS4_SUBMIT_REPORT))
{
TraceDbg(TRACE_DS4, "Received DS4_SUBMIT_REPORT update");
TraceVerbose(TRACE_DS4, "Received DS4_SUBMIT_REPORT update");
RtlCopyBytes(
&this->_Report[1],
&(static_cast<PDS4_SUBMIT_REPORT>(NewReport))->Report,
@@ -1169,15 +1167,15 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::SubmitReportImpl(PVOID NewRepo
//
if (pSubmit->Size == sizeof(DS4_SUBMIT_REPORT_EX))
{
TraceDbg(TRACE_DS4, "Received DS4_SUBMIT_REPORT_EX update");
TraceVerbose(TRACE_DS4, "Received DS4_SUBMIT_REPORT_EX update");
RtlCopyBytes(
&this->_Report[1],
&(static_cast<PDS4_SUBMIT_REPORT_EX>(NewReport))->Report,
sizeof((static_cast<PDS4_SUBMIT_REPORT_EX>(NewReport))->Report)
);
}
if (buffer)
RtlCopyBytes(buffer, this->_Report, DS4_REPORT_SIZE);
@@ -1229,8 +1227,8 @@ void ViGEm::Bus::Targets::EmulationTargetDS4::ProcessPendingNotification(WDFQUEU
PVOID clientBuffer, contextBuffer;
PDS4_REQUEST_NOTIFICATION notify = nullptr;
TraceDbg(TRACE_USBPDO, "%!FUNC! Entry");
FuncEntry(TRACE_DS4);
//
// Loop through and drain all queued requests until buffer is empty
//
@@ -1268,11 +1266,11 @@ void ViGEm::Bus::Targets::EmulationTargetDS4::ProcessPendingNotification(WDFQUEU
notify->SerialNo = this->_SerialNo;
notify->Report = *static_cast<PDS4_OUTPUT_REPORT>(clientBuffer);
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
sizeof(DS4_REQUEST_NOTIFICATION)
);
WdfRequestCompleteWithInformation(request, status, notify->Size);
}
@@ -1287,7 +1285,7 @@ void ViGEm::Bus::Targets::EmulationTargetDS4::ProcessPendingNotification(WDFQUEU
}
}
TraceDbg(TRACE_USBPDO, "%!FUNC! Exit");
TraceVerbose(TRACE_USBPDO, "%!FUNC! Exit");
}
VOID ViGEm::Bus::Targets::EmulationTargetDS4::PendingUsbRequestsTimerFunc(
@@ -1299,7 +1297,7 @@ VOID ViGEm::Bus::Targets::EmulationTargetDS4::PendingUsbRequestsTimerFunc(
WDFREQUEST usbRequest;
TraceDbg(TRACE_DS4, "%!FUNC! Entry");
FuncEntry(TRACE_DS4);
// Get pending USB request
const auto status = WdfIoQueueRetrieveNextRequest(ctx->_PendingUsbInRequests, &usbRequest);
@@ -1328,5 +1326,5 @@ VOID ViGEm::Bus::Targets::EmulationTargetDS4::PendingUsbRequestsTimerFunc(
WdfRequestComplete(usbRequest, status);
}
TraceDbg(TRACE_DS4, "%!FUNC! Exit with status %!STATUS!", status);
TraceVerbose(TRACE_DS4, "%!FUNC! Exit with status %!STATUS!", status);
}

View File

@@ -42,8 +42,6 @@
#include <usbioctl.h>
#include <usbiodef.h>
#include "Debugging.hpp"
PCWSTR ViGEm::Bus::Core::EmulationTargetPDO::_deviceLocation = L"Virtual Gamepad Emulation Bus";
@@ -89,7 +87,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
status = WdfPdoInitAssignDeviceID(DeviceInit, &deviceId);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfPdoInitAssignDeviceID failed with status %!STATUS!",
status);
@@ -100,7 +98,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
status = RtlUnicodeStringPrintf(&buffer, L"%02d", this->_SerialNo);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"RtlUnicodeStringPrintf failed with status %!STATUS!",
status);
@@ -111,7 +109,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
status = WdfPdoInitAssignInstanceID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfPdoInitAssignInstanceID failed with status %!STATUS!",
status);
@@ -122,7 +120,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
status = WdfPdoInitAddDeviceText(DeviceInit, &deviceDescription, &deviceLocation, 0x409);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfPdoInitAddDeviceText failed with status %!STATUS!",
status);
@@ -158,14 +156,14 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
status = WdfDeviceCreate(&DeviceInit, &pdoAttributes, &this->_PdoDevice);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfDeviceCreate failed with status %!STATUS!",
status);
break;
}
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
"Created PDO 0x%p",
this->_PdoDevice);
@@ -181,7 +179,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfDeviceCreateDeviceInterface failed with status %!STATUS!",
status);
@@ -202,7 +200,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"Couldn't initialize additional contexts: %!STATUS!",
status);
@@ -212,7 +210,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
#pragma endregion
#pragma region Create Queues & Locks
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
attributes.ParentObject = this->_PdoDevice;
@@ -227,7 +225,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfIoQueueCreate (PendingUsbInRequests) failed with status %!STATUS!",
status);
@@ -248,7 +246,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfIoQueueCreate (PendingNotificationRequests) failed with status %!STATUS!",
status);
@@ -262,7 +260,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfIoQueueReadyNotify (PendingNotificationRequests) failed with status %!STATUS!",
status);
@@ -288,7 +286,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfIoQueueCreate (Default) failed with status %!STATUS!",
status);
@@ -330,7 +328,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtDeviceContextCleanup(
IN WDFOBJECT Device
)
{
TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_BUSPDO, "%!FUNC! Entry");
TraceVerbose(TRACE_BUSPDO, "%!FUNC! Entry");
const auto ctx = EmulationTargetPdoGetContext(Device);
@@ -367,13 +365,13 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtDeviceContextCleanup(
);
}
}
//
// PDO device object getting disposed, free context object
//
delete ctx->Target;
TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_BUSPDO, "%!FUNC! Exit");
TraceVerbose(TRACE_BUSPDO, "%!FUNC! Exit");
}
NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::SubmitReport(PVOID NewReport)
@@ -428,21 +426,21 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFREQUEST
else
{
TraceEvents(TRACE_LEVEL_WARNING,
TRACE_BUSPDO,
"KeWaitForSingleObject failed with status %!STATUS!",
status
TRACE_BUSPDO,
"KeWaitForSingleObject failed with status %!STATUS!",
status
);
}
}
status = WdfRequestForwardToIoQueue(Request, this->_WaitDeviceReadyRequests);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_BUSPDO,
"WdfRequestForwardToIoQueue failed with status %!STATUS!",
status
TraceError(
TRACE_BUSPDO,
"WdfRequestForwardToIoQueue failed with status %!STATUS!",
status
);
return status;
@@ -451,23 +449,23 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFREQUEST
OBJECT_ATTRIBUTES threadOb;
InitializeObjectAttributes(&threadOb, NULL,
OBJ_KERNEL_HANDLE, NULL, NULL);
OBJ_KERNEL_HANDLE, NULL, NULL);
status = PsCreateSystemThread(&this->_WaitDeviceReadyCompletionWorkerThreadHandle,
static_cast<ACCESS_MASK>(0L),
&threadOb,
nullptr,
nullptr,
WaitDeviceReadyCompletionWorkerRoutine,
this
static_cast<ACCESS_MASK>(0L),
&threadOb,
nullptr,
nullptr,
WaitDeviceReadyCompletionWorkerRoutine,
this
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_BUSPDO,
"PsCreateSystemThread failed with status %!STATUS!",
status
TraceError(
TRACE_BUSPDO,
"PsCreateSystemThread failed with status %!STATUS!",
status
);
}
@@ -481,7 +479,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoPrepare(WDFDEVICE ParentDevice
WDF_IO_QUEUE_CONFIG plugInQueueConfig;
DMF_MODULE_ATTRIBUTES moduleAttributes;
DMF_CONFIG_BufferQueue dmfBufferCfg;
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
attributes.ParentObject = ParentDevice;
@@ -496,7 +494,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoPrepare(WDFDEVICE ParentDevice
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSPDO,
"WdfIoQueueCreate (PendingPlugInRequests) failed with status %!STATUS!",
status);
@@ -530,10 +528,10 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoPrepare(WDFDEVICE ParentDevice
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_BUSPDO,
"DMF_BufferQueue_Create failed with status %!STATUS!",
status
TraceError(
TRACE_BUSPDO,
"DMF_BufferQueue_Create failed with status %!STATUS!",
status
);
}
@@ -617,8 +615,8 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::WaitDeviceReadyCompletionWorkerRoutin
timeout.QuadPart = WDF_REL_TIMEOUT_IN_SEC(1);
TraceEvents(TRACE_LEVEL_INFORMATION,
TRACE_BUSPDO,
"Waiting for 1 second to complete PDO boot..."
TRACE_BUSPDO,
"Waiting for 1 second to complete PDO boot..."
);
NTSTATUS status = KeWaitForSingleObject(
@@ -637,8 +635,8 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::WaitDeviceReadyCompletionWorkerRoutin
if (!NT_SUCCESS(WdfIoQueueRetrieveNextRequest(ctx->_WaitDeviceReadyRequests, &waitRequest)))
{
TraceEvents(TRACE_LEVEL_WARNING,
TRACE_BUSPDO,
"No pending device wait request available"
TRACE_BUSPDO,
"No pending device wait request available"
);
break;
}
@@ -646,8 +644,8 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::WaitDeviceReadyCompletionWorkerRoutin
if (status == STATUS_TIMEOUT)
{
TraceEvents(TRACE_LEVEL_WARNING,
TRACE_BUSPDO,
"Device wait request timed out, completing with error"
TRACE_BUSPDO,
"Device wait request timed out, completing with error"
);
//
@@ -660,8 +658,8 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::WaitDeviceReadyCompletionWorkerRoutin
if (NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_INFORMATION,
TRACE_BUSPDO,
"Device wait request completed successfully"
TRACE_BUSPDO,
"Device wait request completed successfully"
);
//
@@ -670,8 +668,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::WaitDeviceReadyCompletionWorkerRoutin
WdfRequestComplete(waitRequest, STATUS_SUCCESS);
break;
}
}
while (FALSE);
} while (FALSE);
ZwClose(ctx->_WaitDeviceReadyCompletionWorkerThreadHandle);
ctx->_WaitDeviceReadyCompletionWorkerThreadHandle = nullptr;
@@ -699,7 +696,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::DumpAsHex(PCSTR Prefix, PVOID Buffer,
sprintf(&dumpBuffer[i * 2], "%02X", static_cast<PUCHAR>(Buffer)[i]);
}
TraceDbg(TRACE_BUSPDO,
TraceVerbose(TRACE_BUSPDO,
"%s - Buffer length: %04d, buffer content: %s\n",
Prefix,
BufferLength,
@@ -751,14 +748,14 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::UsbGetConfigurationDescriptorType
NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::UsbSelectConfiguration(PURB Urb)
{
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: TotalLength %d",
Urb->UrbHeader.Length);
if (Urb->UrbHeader.Length == sizeof(struct _URB_SELECT_CONFIGURATION))
{
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: NULL ConfigurationDescriptor");
return STATUS_SUCCESS;
@@ -835,7 +832,7 @@ BOOLEAN ViGEm::Bus::Core::EmulationTargetPDO::EvtChildListIdentificationDescript
NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFDEVICE ParentDevice, ULONG SerialNo,
WDFREQUEST Request)
WDFREQUEST Request)
{
NTSTATUS status;
PDO_IDENTIFICATION_DESCRIPTION description;
@@ -843,8 +840,8 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFDEVICE
WDF_CHILD_RETRIEVE_INFO childInfo;
WDFDEVICE childDevice;
TraceDbg(TRACE_BUSPDO, "%!FUNC! Entry");
FuncEntry(TRACE_BUSPDO);
const WDFCHILDLIST list = WdfFdoGetDefaultChildList(ParentDevice);
WDF_CHILD_LIST_ITERATOR_INIT(
@@ -893,8 +890,8 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFDEVICE
&iterator
);
TraceDbg(TRACE_BUSPDO, "%!FUNC! Exit with status %!STATUS!", status);
TraceVerbose(TRACE_BUSPDO, "%!FUNC! Exit with status %!STATUS!", status);
return status;
}
@@ -904,7 +901,7 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EvtDevicePrepareHardware(
_In_ WDFCMRESLIST ResourcesTranslated
)
{
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_BUSPDO, "%!FUNC! Entry");
FuncEntry(TRACE_BUSPDO);
UNREFERENCED_PARAMETER(ResourcesRaw);
UNREFERENCED_PARAMETER(ResourcesTranslated);
@@ -936,7 +933,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
PURB urb;
PIO_STACK_LOCATION irpStack;
TraceDbg(TRACE_BUSPDO, "%!FUNC! Entry");
FuncEntry(TRACE_BUSPDO);
// No help from the framework available from here on
irp = WdfRequestWdmGetIrp(Request);
@@ -946,7 +943,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
{
case IOCTL_INTERNAL_USB_SUBMIT_URB:
TraceDbg(
TraceVerbose(
TRACE_BUSPDO,
">> IOCTL_INTERNAL_USB_SUBMIT_URB");
@@ -956,7 +953,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
{
case URB_FUNCTION_CONTROL_TRANSFER:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_CONTROL_TRANSFER");
@@ -966,7 +963,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_CONTROL_TRANSFER_EX:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_CONTROL_TRANSFER_EX");
@@ -976,7 +973,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER:
TraceDbg(
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER");
@@ -986,7 +983,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_SELECT_CONFIGURATION:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_SELECT_CONFIGURATION");
@@ -996,7 +993,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_SELECT_INTERFACE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_SELECT_INTERFACE");
@@ -1006,7 +1003,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_GET_DESCRIPTOR_FROM_DEVICE");
@@ -1014,7 +1011,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
{
case USB_DEVICE_DESCRIPTOR_TYPE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> >> USB_DEVICE_DESCRIPTOR_TYPE");
@@ -1025,7 +1022,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case USB_CONFIGURATION_DESCRIPTOR_TYPE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> >> USB_CONFIGURATION_DESCRIPTOR_TYPE");
@@ -1035,7 +1032,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case USB_STRING_DESCRIPTOR_TYPE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> >> USB_STRING_DESCRIPTOR_TYPE");
@@ -1045,14 +1042,14 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
default:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> >> Unknown descriptor type");
break;
}
TraceDbg(
TraceVerbose(
TRACE_BUSPDO,
"<< <<");
@@ -1060,7 +1057,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_GET_STATUS_FROM_DEVICE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_GET_STATUS_FROM_DEVICE");
@@ -1071,7 +1068,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_ABORT_PIPE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_ABORT_PIPE");
@@ -1081,7 +1078,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_CLASS_INTERFACE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_CLASS_INTERFACE");
@@ -1091,7 +1088,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> URB_FUNCTION_GET_DESCRIPTOR_FROM_INTERFACE");
@@ -1101,7 +1098,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
default:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> >> Unknown function: 0x%X",
urb->UrbHeader.Function);
@@ -1109,7 +1106,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
break;
}
TraceDbg(
TraceVerbose(
TRACE_BUSPDO,
"<<");
@@ -1117,7 +1114,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case IOCTL_INTERNAL_USB_GET_PORT_STATUS:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> IOCTL_INTERNAL_USB_GET_PORT_STATUS");
@@ -1130,7 +1127,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case IOCTL_INTERNAL_USB_RESET_PORT:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> IOCTL_INTERNAL_USB_RESET_PORT");
@@ -1141,7 +1138,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
case IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION");
@@ -1153,7 +1150,7 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
default:
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSPDO,
">> Unknown I/O control code 0x%X",
IoControlCode);
@@ -1166,12 +1163,12 @@ VOID ViGEm::Bus::Core::EmulationTargetPDO::EvtIoInternalDeviceControl(
WdfRequestComplete(Request, status);
}
TraceDbg(TRACE_BUSPDO, "%!FUNC! Exit with status %!STATUS!", status);
TraceVerbose(TRACE_BUSPDO, "%!FUNC! Exit with status %!STATUS!", status);
}
void ViGEm::Bus::Core::EmulationTargetPDO::EvtWdfIoPendingNotificationQueueState(
WDFQUEUE Queue,
WDFCONTEXT Context
WDFQUEUE Queue,
WDFCONTEXT Context
)
{
const auto pThis = static_cast<EmulationTargetPDO*>(Context);
@@ -1183,6 +1180,6 @@ void ViGEm::Bus::Core::EmulationTargetPDO::EvtWdfIoPendingNotificationQueueState
{
return;
}
pThis->ProcessPendingNotification(Queue);
}

View File

@@ -41,8 +41,6 @@
#include "XusbPdo.hpp"
#include "Ds4Pdo.hpp"
#include "Debugging.hpp"
using ViGEm::Bus::Core::PDO_IDENTIFICATION_DESCRIPTION;
using ViGEm::Bus::Core::EmulationTargetPDO;
using ViGEm::Bus::Targets::EmulationTargetXUSB;
@@ -76,7 +74,7 @@ VOID Bus_EvtIoDeviceControl(
Device = WdfIoQueueGetDevice(Queue);
TraceDbg(TRACE_QUEUE, "%!FUNC! Entry (device: 0x%p)", Device);
TraceVerbose(TRACE_QUEUE, "%!FUNC! Entry (device: 0x%p)", Device);
switch (IoControlCode)
{
@@ -84,7 +82,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_VIGEM_CHECK_VERSION:
TraceDbg(TRACE_QUEUE, "IOCTL_VIGEM_CHECK_VERSION");
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_CHECK_VERSION");
status = WdfRequestRetrieveInputBuffer(
Request,
@@ -101,7 +99,7 @@ VOID Bus_EvtIoDeviceControl(
status = (pCheckVersion->Version == VIGEM_COMMON_VERSION) ? STATUS_SUCCESS : STATUS_NOT_SUPPORTED;
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_QUEUE,
"Requested version: 0x%04X, compiled version: 0x%04X",
pCheckVersion->Version, VIGEM_COMMON_VERSION);
@@ -114,7 +112,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_VIGEM_WAIT_DEVICE_READY:
TraceDbg(TRACE_QUEUE, "IOCTL_VIGEM_WAIT_DEVICE_READY");
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_WAIT_DEVICE_READY");
status = WdfRequestRetrieveInputBuffer(
Request,
@@ -132,7 +130,7 @@ VOID Bus_EvtIoDeviceControl(
// This request only supports a single PDO at a time
if (pWaitDeviceReady->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Invalid serial 0 submitted");
@@ -156,7 +154,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_VIGEM_PLUGIN_TARGET:
TraceDbg(TRACE_QUEUE, "IOCTL_VIGEM_PLUGIN_TARGET");
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_PLUGIN_TARGET");
status = Bus_PlugInDevice(Device, Request, FALSE, &length);
@@ -168,7 +166,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_VIGEM_UNPLUG_TARGET:
TraceDbg(TRACE_QUEUE, "IOCTL_VIGEM_UNPLUG_TARGET");
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_UNPLUG_TARGET");
status = Bus_UnPlugDevice(Device, Request, FALSE, &length);
@@ -180,7 +178,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_XUSB_SUBMIT_REPORT:
TraceDbg(TRACE_QUEUE, "IOCTL_XUSB_SUBMIT_REPORT");
TraceVerbose(TRACE_QUEUE, "IOCTL_XUSB_SUBMIT_REPORT");
status = WdfRequestRetrieveInputBuffer(
Request,
@@ -191,7 +189,7 @@ VOID Bus_EvtIoDeviceControl(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
status);
@@ -203,7 +201,7 @@ VOID Bus_EvtIoDeviceControl(
// This request only supports a single PDO at a time
if (xusbSubmit->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Invalid serial 0 submitted");
@@ -225,12 +223,12 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_XUSB_REQUEST_NOTIFICATION:
TraceDbg(TRACE_QUEUE, "IOCTL_XUSB_REQUEST_NOTIFICATION");
TraceVerbose(TRACE_QUEUE, "IOCTL_XUSB_REQUEST_NOTIFICATION");
// Don't accept the request if the output buffer can't hold the results
if (OutputBufferLength < sizeof(XUSB_REQUEST_NOTIFICATION))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Output buffer %d too small, require at least %d",
static_cast<int>(OutputBufferLength), static_cast<int>(sizeof(XUSB_REQUEST_NOTIFICATION)));
@@ -246,7 +244,7 @@ VOID Bus_EvtIoDeviceControl(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
status);
@@ -258,7 +256,7 @@ VOID Bus_EvtIoDeviceControl(
// This request only supports a single PDO at a time
if (xusbNotify->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Invalid serial 0 submitted");
@@ -284,7 +282,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_DS4_SUBMIT_REPORT:
TraceDbg(TRACE_QUEUE, "IOCTL_DS4_SUBMIT_REPORT");
TraceVerbose(TRACE_QUEUE, "IOCTL_DS4_SUBMIT_REPORT");
status = WdfRequestRetrieveInputBuffer(
Request,
@@ -295,7 +293,7 @@ VOID Bus_EvtIoDeviceControl(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
status);
@@ -307,7 +305,7 @@ VOID Bus_EvtIoDeviceControl(
//
if (length < sizeof(DS4_SUBMIT_REPORT) || length > sizeof(DS4_SUBMIT_REPORT_EX))
{
TraceDbg(
TraceVerbose(
TRACE_QUEUE,
"Unexpected buffer size: %d",
static_cast<ULONG>(length)
@@ -322,7 +320,7 @@ VOID Bus_EvtIoDeviceControl(
//
if (length != ds4Submit->Size)
{
TraceDbg(
TraceVerbose(
TRACE_QUEUE,
"Invalid buffer size: %d",
ds4Submit->Size
@@ -337,7 +335,7 @@ VOID Bus_EvtIoDeviceControl(
//
if (ds4Submit->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Invalid serial 0 submitted");
@@ -358,12 +356,12 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_DS4_REQUEST_NOTIFICATION:
TraceDbg(TRACE_QUEUE, "IOCTL_DS4_REQUEST_NOTIFICATION");
TraceVerbose(TRACE_QUEUE, "IOCTL_DS4_REQUEST_NOTIFICATION");
// Don't accept the request if the output buffer can't hold the results
if (OutputBufferLength < sizeof(DS4_REQUEST_NOTIFICATION))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Output buffer %d too small, require at least %d",
static_cast<int>(OutputBufferLength), static_cast<int>(sizeof(DS4_REQUEST_NOTIFICATION)));
@@ -379,7 +377,7 @@ VOID Bus_EvtIoDeviceControl(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
status);
@@ -391,7 +389,7 @@ VOID Bus_EvtIoDeviceControl(
// This request only supports a single PDO at a time
if (ds4Notify->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_QUEUE,
"Invalid serial 0 submitted");
@@ -417,7 +415,7 @@ VOID Bus_EvtIoDeviceControl(
case IOCTL_XUSB_GET_USER_INDEX:
TraceDbg(TRACE_QUEUE, "IOCTL_XUSB_GET_USER_INDEX");
TraceVerbose(TRACE_QUEUE, "IOCTL_XUSB_GET_USER_INDEX");
// Don't accept the request if the output buffer can't hold the results
if (OutputBufferLength < sizeof(XUSB_GET_USER_INDEX))
@@ -474,7 +472,7 @@ VOID Bus_EvtIoDeviceControl(
WdfRequestCompleteWithInformation(Request, status, length);
}
TraceDbg(TRACE_QUEUE, "%!FUNC! Exit with status %!STATUS!", status);
TraceVerbose(TRACE_QUEUE, "%!FUNC! Exit with status %!STATUS!", status);
}
EXTERN_C_END

View File

@@ -56,7 +56,7 @@ WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll = 1
;*****************************************
[Manufacturer]
%ManufacturerName%=Standard,NTamd64,NTx86
%ManufacturerName%=Standard,NTamd64,NTx86,NTARM64
[Standard.NTamd64]
%ViGEmBus.DeviceDesc%=ViGEmBus_Device, Nefarius\ViGEmBus\Gen1
@@ -64,6 +64,9 @@ WdfCoInstaller$KMDFCOINSTALLERVERSION$.dll = 1
[Standard.NTx86]
%ViGEmBus.DeviceDesc%=ViGEmBus_Device, Nefarius\ViGEmBus\Gen1
[Standard.NTARM64]
%ViGEmBus.DeviceDesc%=ViGEmBus_Device, Nefarius\ViGEmBus\Gen1
[ViGEmBus_Device.NT]
CopyFiles=Drivers_Dir

View File

@@ -39,7 +39,6 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\sdk\include\ViGEm\km\BusShared.h" />
<ClInclude Include="Debugging.hpp" />
<ClInclude Include="Driver.h" />
<ClInclude Include="CRTCPP.hpp" />
<ClInclude Include="Ds4Pdo.hpp" />
@@ -159,16 +158,19 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>true</UseDebugLibraries>
<Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<TargetVersion>Windows10</TargetVersion>
<UseDebugLibraries>false</UseDebugLibraries>
<Driver_SpectreMitigation>Spectre</Driver_SpectreMitigation>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="DMF.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
@@ -212,10 +214,10 @@
<WppKernelMode>true</WppKernelMode>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>..\..\DMF\Debug\Win32\lib\DmfK\DmfK.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@@ -226,10 +228,10 @@
<WppKernelMode>true</WppKernelMode>
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>..\..\DMF\Release\Win32\lib\DmfK\DmfK.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
@@ -243,10 +245,10 @@
<WppKernelMode>true</WppKernelMode>
<PreprocessorDefinitions>_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>..\..\DMF\Debug\x64\lib\DmfK\DmfK.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -257,10 +259,10 @@
<WppKernelMode>true</WppKernelMode>
<PreprocessorDefinitions>_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalIncludeDirectories>..\..\DMF\DMF\Modules.Library;..\..\DMF\DMF\Framework;$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>..\..\DMF\Release\x64\lib\DmfK\DmfK.lib;$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
<Inf>
<TimeStamp>1.0.0.0</TimeStamp>
@@ -272,6 +274,7 @@
<WppRecorderEnabled>true</WppRecorderEnabled>
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
<WppKernelMode>true</WppKernelMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
@@ -283,6 +286,7 @@
<WppRecorderEnabled>true</WppRecorderEnabled>
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
<WppKernelMode>true</WppKernelMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
@@ -294,9 +298,12 @@
<WppRecorderEnabled>true</WppRecorderEnabled>
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
<WppKernelMode>true</WppKernelMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<DisableSpecificWarnings>5040;4064;4627;4627;4366;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
@@ -305,9 +312,12 @@
<WppRecorderEnabled>true</WppRecorderEnabled>
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
<WppKernelMode>true</WppKernelMode>
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
<DisableSpecificWarnings>5040;4064;4627;4627;4366;%(DisableSpecificWarnings)</DisableSpecificWarnings>
</ClCompile>
<Link>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>

View File

@@ -57,9 +57,6 @@
<ClInclude Include="..\sdk\include\ViGEm\km\BusShared.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="Debugging.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="XusbPdo.cpp">

View File

@@ -43,8 +43,6 @@
#include <usbbusif.h>
#include <ViGEm/km/BusShared.h>
#include "Debugging.hpp"
PCWSTR ViGEm::Bus::Targets::EmulationTargetXUSB::_deviceDescription = L"Virtual Xbox 360 Controller";
@@ -88,7 +86,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = RtlUnicodeStringInit(DeviceDescription, _deviceDescription);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"RtlUnicodeStringInit failed with status %!STATUS!",
status);
@@ -103,7 +101,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = WdfPdoInitAddHardwareID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfPdoInitAddHardwareID failed with status %!STATUS!",
status);
@@ -117,7 +115,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfPdoInitAddCompatibleID #1 failed with status %!STATUS!",
status);
@@ -129,7 +127,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfPdoInitAddCompatibleID #2 failed with status %!STATUS!",
status);
@@ -141,7 +139,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfPdoInitAddCompatibleID #3 failed with status %!STATUS!",
status);
@@ -153,7 +151,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareDevice(PWDFDEVICE_I
status = WdfPdoInitAddCompatibleID(DeviceInit, &buffer);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfPdoInitAddCompatibleID #4 failed with status %!STATUS!",
status);
@@ -197,7 +195,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoPrepareHardware()
status = WdfDeviceAddQueryInterface(this->_PdoDevice, &ifaceCfg);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfDeviceAddQueryInterface failed with status %!STATUS!",
status);
@@ -215,7 +213,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoInitContext()
WDF_OBJECT_ATTRIBUTES_INIT(&attributes);
attributes.ParentObject = this->_PdoDevice;
TraceEvents(TRACE_LEVEL_VERBOSE, TRACE_XUSB, "Initializing XUSB context...");
TraceVerbose(TRACE_XUSB, "Initializing XUSB context...");
RtlZeroMemory(this->_Rumble, ARRAYSIZE(this->_Rumble));
@@ -241,7 +239,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfMemoryCreate failed with status %!STATUS!",
status);
@@ -284,7 +282,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::PdoInitContext()
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_XUSB,
"WdfIoQueueCreate (HoldingUsbInRequests) failed with status %!STATUS!",
status);
@@ -468,7 +466,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SelectConfiguration(PURB Urb)
PUSBD_INTERFACE_INFORMATION pInfo = &Urb->UrbSelectConfiguration.Interface;
TraceDbg(
TraceVerbose(
TRACE_XUSB,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
(int)pInfo->Length,
@@ -500,7 +498,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SelectConfiguration(PURB Urb)
pInfo = (PUSBD_INTERFACE_INFORMATION)((PCHAR)pInfo + pInfo->Length);
TraceDbg(
TraceVerbose(
TRACE_XUSB,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
(int)pInfo->Length,
@@ -548,7 +546,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SelectConfiguration(PURB Urb)
pInfo = (PUSBD_INTERFACE_INFORMATION)((PCHAR)pInfo + pInfo->Length);
TraceDbg(
TraceVerbose(
TRACE_XUSB,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
(int)pInfo->Length,
@@ -572,7 +570,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SelectConfiguration(PURB Urb)
pInfo = (PUSBD_INTERFACE_INFORMATION)((PCHAR)pInfo + pInfo->Length);
TraceDbg(
TraceVerbose(
TRACE_XUSB,
">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d",
(int)pInfo->Length,
@@ -611,7 +609,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbSelectInterface(PURB Urb)
{
PUSBD_INTERFACE_INFORMATION pInfo = &Urb->UrbSelectInterface.Interface;
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_INTERFACE: Length %d, Interface %d, Alternate %d, Pipes %d",
(int)pInfo->Length,
@@ -619,7 +617,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbSelectInterface(PURB Urb)
(int)pInfo->AlternateSetting,
pInfo->NumberOfPipes);
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_SELECT_INTERFACE: Class %d, SubClass %d, Protocol %d",
(int)pInfo->Class,
@@ -708,7 +706,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
// Data coming FROM us TO higher driver
if (pTransfer->TransferFlags & USBD_TRANSFER_DIRECTION_IN)
{
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> Incoming request, queuing...");
@@ -807,7 +805,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
}
// Data coming FROM the higher driver TO us
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
">> >> >> URB_FUNCTION_BULK_OR_INTERRUPT_TRANSFER: Handle %p, Flags %X, Length %d",
pTransfer->PipeHandle,
@@ -820,7 +818,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
{
auto Buffer = static_cast<PUCHAR>(pTransfer->TransferBuffer);
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
"-- LED Buffer: %02X %02X %02X",
Buffer[0], Buffer[1], Buffer[2]);
@@ -833,7 +831,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
if (Buffer[2] == 0x04)this->_LedNumber = 2;
if (Buffer[2] == 0x05)this->_LedNumber = 3;
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
"-- LED Number: %d",
this->_LedNumber);
@@ -850,7 +848,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
{
auto Buffer = static_cast<PUCHAR>(pTransfer->TransferBuffer);
TraceDbg(
TraceVerbose(
TRACE_USBPDO,
"-- Rumble Buffer: %02X %02X %02X %02X %02X %02X %02X %02X",
Buffer[0],
@@ -891,18 +889,18 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
notify->SmallMotor = this->_Rumble[4];
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
sizeof(XUSB_REQUEST_NOTIFICATION)
notify,
sizeof(XUSB_REQUEST_NOTIFICATION)
);
WdfRequestCompleteWithInformation(notifyRequest, status, notify->Size);
}
else
{
TraceEvents(TRACE_LEVEL_ERROR,
TRACE_USBPDO,
"WdfRequestRetrieveOutputBuffer failed with status %!STATUS!",
status);
TraceError(
TRACE_USBPDO,
"WdfRequestRetrieveOutputBuffer failed with status %!STATUS!",
status);
}
}
else
@@ -923,7 +921,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbBulkOrInterruptTransfer(_U
*static_cast<size_t*>(contextBuffer) = pTransfer->TransferBufferLength;
TraceDbg(TRACE_USBPDO, "Queued %Iu bytes", pTransfer->TransferBufferLength);
TraceVerbose(TRACE_USBPDO, "Queued %Iu bytes", pTransfer->TransferBufferLength);
DMF_BufferQueue_Enqueue(this->_UsbInterruptOutBufferQueue, clientBuffer);
}
@@ -977,7 +975,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::UsbControlTransfer(PURB Urb)
NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SubmitReportImpl(PVOID NewReport)
{
TraceDbg(TRACE_BUSENUM, "%!FUNC! Entry");
FuncEntry(TRACE_BUSENUM);
NTSTATUS status = STATUS_SUCCESS;
BOOLEAN changed;
@@ -990,14 +988,14 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SubmitReportImpl(PVOID NewRep
// Don't waste pending IRP if input hasn't changed
if (!changed)
{
TraceDbg(
TraceVerbose(
TRACE_BUSENUM,
"Input report hasn't changed since last update, aborting with %!STATUS!",
status);
return status;
}
TraceDbg(
TraceVerbose(
TRACE_BUSENUM,
"Received new report, processing");
@@ -1025,7 +1023,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::SubmitReportImpl(PVOID NewRep
// Complete pending request
WdfRequestComplete(usbRequest, status);
TraceDbg(TRACE_BUSENUM, "%!FUNC! Exit with status %!STATUS!", status);
TraceVerbose(TRACE_BUSENUM, "%!FUNC! Exit with status %!STATUS!", status);
return status;
}
@@ -1037,7 +1035,7 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetXUSB::GetUserIndex(PULONG UserIndex
if (!UserIndex)
return STATUS_INVALID_PARAMETER;
if (this->_LedNumber >= 0)
{
*UserIndex = static_cast<ULONG>(this->_LedNumber);
@@ -1057,8 +1055,8 @@ void ViGEm::Bus::Targets::EmulationTargetXUSB::ProcessPendingNotification(WDFQUE
size_t bufferLength;
PXUSB_REQUEST_NOTIFICATION notify = nullptr;
TraceDbg(TRACE_BUSENUM, "%!FUNC! Entry");
FuncEntry(TRACE_BUSENUM);
//
// Loop through and drain all queued requests until buffer is empty
//
@@ -1103,7 +1101,7 @@ void ViGEm::Bus::Targets::EmulationTargetXUSB::ProcessPendingNotification(WDFQUE
reinterpret_cast<PVOID*>(&notify),
nullptr
)))
{
{
notify->Size = sizeof(XUSB_REQUEST_NOTIFICATION);
notify->SerialNo = this->_SerialNo;
notify->LedNumber = this->_LedNumber; // Report last cached value
@@ -1119,11 +1117,11 @@ void ViGEm::Bus::Targets::EmulationTargetXUSB::ProcessPendingNotification(WDFQUE
notify->SmallMotor = this->_Rumble[4]; // Cached value
}
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
notify,
sizeof(XUSB_REQUEST_NOTIFICATION)
);
WdfRequestCompleteWithInformation(request, status, notify->Size);
}
@@ -1138,5 +1136,5 @@ void ViGEm::Bus::Targets::EmulationTargetXUSB::ProcessPendingNotification(WDFQUE
}
}
TraceDbg(TRACE_BUSENUM, "%!FUNC! Exit");
TraceVerbose(TRACE_BUSENUM, "%!FUNC! Exit");
}

View File

@@ -41,8 +41,6 @@
#include "XusbPdo.hpp"
#include "Ds4Pdo.hpp"
#include "Debugging.hpp"
#ifdef ALLOC_PRAGMA
#pragma alloc_text (PAGE, Bus_PlugInDevice)
#pragma alloc_text (PAGE, Bus_UnPlugDevice)
@@ -84,7 +82,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!", status);
return status;
@@ -92,7 +90,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
if ((sizeof(VIGEM_PLUGIN_TARGET) != plugIn->Size) || (length != plugIn->Size))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"sizeof(VIGEM_PLUGIN_TARGET) buffer size mismatch [%d != %d]",
sizeof(VIGEM_PLUGIN_TARGET), plugIn->Size);
@@ -101,7 +99,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
if (plugIn->SerialNo == 0)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"Serial no. 0 not allowed");
return STATUS_INVALID_PARAMETER;
@@ -112,7 +110,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
fileObject = WdfRequestGetFileObject(Request);
if (fileObject == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfRequestGetFileObject failed to fetch WDFFILEOBJECT from request 0x%p",
Request);
@@ -122,7 +120,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
pFileData = FileObjectGetData(fileObject);
if (pFileData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"FileObjectGetData failed to get context data for 0x%p",
fileObject);
@@ -199,7 +197,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfChildListAddOrUpdateChildDescriptionAsPresent failed with status %!STATUS!",
status);
@@ -214,7 +212,7 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
{
status = STATUS_INVALID_PARAMETER;
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"The described PDO already exists (%!STATUS!)",
status);
@@ -263,7 +261,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
status);
@@ -272,7 +270,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
if ((sizeof(VIGEM_UNPLUG_TARGET) != unPlug->Size) || (length != unPlug->Size))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"sizeof(VIGEM_UNPLUG_TARGET) buffer size mismatch [%d != %d]",
sizeof(VIGEM_UNPLUG_TARGET), unPlug->Size);
@@ -285,7 +283,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
fileObject = WdfRequestGetFileObject(Request);
if (fileObject == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfRequestGetFileObject failed to fetch WDFFILEOBJECT from request 0x%p",
Request);
@@ -295,14 +293,14 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
pFileData = FileObjectGetData(fileObject);
if (pFileData == NULL)
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"FileObjectGetData failed to get context data for 0x%p",
fileObject);
return STATUS_INVALID_PARAMETER;
}
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"Starting child list traversal");
@@ -322,7 +320,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
// Error or no more children, end loop
if (!NT_SUCCESS(status) || status == STATUS_NO_MORE_ENTRIES)
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"WdfChildListRetrieveNextDevice returned with status %!STATUS!",
status);
@@ -332,7 +330,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
// If unable to retrieve device
if (childInfo.Status != WdfChildListRetrieveDeviceSuccess)
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"childInfo.Status = %d",
childInfo.Status);
@@ -342,7 +340,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
// Child isn't the one we looked for, skip
if (!unplugAll && description.SerialNo != unPlug->SerialNo)
{
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"Seeking serial mismatch: %d != %d",
description.SerialNo,
@@ -350,7 +348,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
continue;
}
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"description.SessionId = %d, pFileData->SessionId = %d",
description.SessionId,
@@ -363,7 +361,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
status = WdfChildListUpdateChildDescriptionAsMissing(list, &description.Header);
if (!NT_SUCCESS(status))
{
TraceEvents(TRACE_LEVEL_ERROR,
TraceError(
TRACE_BUSENUM,
"WdfChildListUpdateChildDescriptionAsMissing failed with status %!STATUS!",
status);
@@ -373,7 +371,7 @@ EXTERN_C NTSTATUS Bus_UnPlugDevice(
WdfChildListEndIteration(list, &iterator);
TraceEvents(TRACE_LEVEL_VERBOSE,
TraceVerbose(
TRACE_BUSENUM,
"Finished child list traversal");

View File

@@ -36,8 +36,6 @@
#include "Driver.h"
#include "EmulationTargetPDO.hpp"
#include "Debugging.hpp"
#ifdef ALLOC_PRAGMA
#pragma alloc_text(PAGE, Bus_EvtDeviceListCreatePdo)
#endif

View File

@@ -44,6 +44,7 @@
ViGEmBusTraceGuid, (c5ce18fe,27bd,4049,b0b4,8a47cab1dcd9), \
\
WPP_DEFINE_BIT(MYDRIVER_ALL_INFO) \
WPP_DEFINE_BIT(DMF_TRACE) \
WPP_DEFINE_BIT(TRACE_BUSENUM) \
WPP_DEFINE_BIT(TRACE_BUSPDO) \
WPP_DEFINE_BIT(TRACE_BYTEARRAY) \
@@ -73,9 +74,28 @@
// This comment block is scanned by the trace preprocessor to define our
// Trace function.
//
// USEPREFIX and USESUFFIX strip all trailing whitespace, so we need to surround
// FuncExit messages with brackets
//
// begin_wpp config
// FUNC Trace{FLAG=MYDRIVER_ALL_INFO}(LEVEL, MSG, ...);
// FUNC TraceEvents(LEVEL, FLAGS, MSG, ...);
// FUNC TraceDbg{LEVEL=TRACE_LEVEL_INFORMATION}(FLAGS, MSG, ...);
// FUNC FuncEntry{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS);
// FUNC FuncEntryArguments{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS, MSG, ...);
// FUNC FuncExit{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS, MSG, ...);
// FUNC FuncExitVoid{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS);
// FUNC TraceError{LEVEL=TRACE_LEVEL_ERROR}(FLAGS, MSG, ...);
// FUNC TraceInformation{LEVEL=TRACE_LEVEL_INFORMATION}(FLAGS, MSG, ...);
// FUNC TraceVerbose{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS, MSG, ...);
// FUNC FuncExitNoReturn{LEVEL=TRACE_LEVEL_VERBOSE}(FLAGS);
// USEPREFIX(FuncEntry, "%!STDPREFIX! [%!FUNC!] --> Entry");
// USEPREFIX(FuncEntryArguments, "%!STDPREFIX! [%!FUNC!] --> Entry <");
// USEPREFIX(FuncExit, "%!STDPREFIX! [%!FUNC!] <-- Exit <");
// USESUFFIX(FuncExit, ">");
// USEPREFIX(FuncExitVoid, "%!STDPREFIX! [%!FUNC!] <-- Exit");
// USEPREFIX(TraceError, "%!STDPREFIX! [%!FUNC!] ERROR:");
// USEPREFIX(TraceEvents, "%!STDPREFIX! [%!FUNC!] ");
// USEPREFIX(TraceInformation, "%!STDPREFIX! [%!FUNC!] ");
// USEPREFIX(TraceVerbose, "%!STDPREFIX! [%!FUNC!] ");
// USEPREFIX(FuncExitNoReturn, "%!STDPREFIX! [%!FUNC!] <--");
// end_wpp
//