mirror of
https://github.com/nefarius/ViGEmBus.git
synced 2025-08-10 00:52:17 +00:00
Compare commits
79 Commits
v1.18.377.
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d986e1d937 | ||
|
|
b8ffdcfab9 | ||
|
|
79a4294fea | ||
|
|
ede578ea01 | ||
|
|
b1182d5f04 | ||
|
|
22835473d1 | ||
|
|
b002422ec0 | ||
|
|
68c75bdd0d | ||
|
|
8cf6470f98 | ||
|
|
6d83f69f0e | ||
|
|
dc1d1de1c5 | ||
|
|
a980f37ab7 | ||
|
|
4c0335d52e | ||
|
|
e7b53fd366 | ||
|
|
c16a5a3f2d | ||
|
|
e3f80e100f | ||
|
|
8ffa5a6d42 | ||
|
|
1e53a69a9d | ||
|
|
11ab723e6b | ||
|
|
fc4e2f0413 | ||
|
|
d2ba1096d4 | ||
|
|
093fc4aa8d | ||
|
|
f387b3c3c8 | ||
|
|
1061feada4 | ||
|
|
fb5424d39c | ||
|
|
91d14b0bfe | ||
|
|
e50d4d7915 | ||
|
|
8275e58285 | ||
|
|
9ad2b37fa7 | ||
|
|
beb05ec5e3 | ||
|
|
a70960c29b | ||
|
|
b613e64d8e | ||
|
|
4ad341e63f | ||
|
|
a67de546bb | ||
|
|
1236552dc4 | ||
|
|
54810aa9cc | ||
|
|
389218db04 | ||
|
|
dc9ad86b4c | ||
|
|
c3d0ee7283 | ||
|
|
63660daf96 | ||
|
|
a52fbf18be | ||
|
|
4874c3ba91 | ||
|
|
0de1ea1a26 | ||
|
|
87f5365410 | ||
|
|
9c66a4a36b | ||
|
|
82502e1033 | ||
|
|
e022cfad03 | ||
|
|
52e232273e | ||
|
|
5d755baead | ||
|
|
4607dda9ca | ||
|
|
1ccf09c232 | ||
|
|
bd5d07206b | ||
|
|
0a2ff96e0c | ||
|
|
7d81cf3d76 | ||
|
|
11603f6b13 | ||
|
|
dfac762b0c | ||
|
|
4332a35f9c | ||
|
|
770261ddc8 | ||
|
|
e391dd09b4 | ||
|
|
b41de16d44 | ||
|
|
e18a4cb721 | ||
|
|
d0052f95a5 | ||
|
|
af3117bd4e | ||
|
|
2842bc6a4f | ||
|
|
0d0648992f | ||
|
|
9441b25e0c | ||
|
|
dbe41ff10f | ||
|
|
ac42c35816 | ||
|
|
c27138d354 | ||
|
|
3a6d955500 | ||
|
|
84d384ed29 | ||
|
|
ebc7015315 | ||
|
|
02354c2dba | ||
|
|
59b8f0f8e9 | ||
|
|
bb681cd29e | ||
|
|
7e9db0dac1 | ||
|
|
f0c34576dc | ||
|
|
2d3bd13494 | ||
|
|
6f03e9c68d |
8
.github/ISSUE_TEMPLATE/config.yml
vendored
8
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,11 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 💬 Community support
|
||||
url: https://vigem.org/Community-Support/
|
||||
url: https://docs.nefarius.at/Community-Support/
|
||||
about: Use these resources for support.
|
||||
- name: 📖 Documentation
|
||||
url: https://vigem.org/projects/
|
||||
url: https://docs.nefarius.at/projects/
|
||||
about: Extended documentation about the projects.
|
||||
- name: ❓ Other issue?
|
||||
url: https://forums.vigem.org/
|
||||
about: Search on the community forums.
|
||||
url: https://discord.nefarius.at/
|
||||
about: See you on Discord.
|
||||
|
||||
6
.github/dependabot.yml
vendored
Normal file
6
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
2
.github/workflows/support.yml
vendored
2
.github/workflows/support.yml
vendored
@@ -11,7 +11,7 @@ jobs:
|
||||
action:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/support-requests@v2
|
||||
- uses: dessant/support-requests@v3
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
support-label: 'support'
|
||||
|
||||
13
.github/workflows/winget.yml
vendored
Normal file
13
.github/workflows/winget.yml
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
name: Publish to WinGet
|
||||
on:
|
||||
release:
|
||||
types: [released]
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: vedantmgoyal2009/winget-releaser@v2
|
||||
with:
|
||||
identifier: ViGEm.ViGEmBus
|
||||
token: ${{ secrets.WINGET_TOKEN }}
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -365,3 +365,6 @@ FodyWeavers.xsd
|
||||
/_setup
|
||||
/setup/Setup Files
|
||||
/setup/ViGEmBus-cache
|
||||
/setup/ViGEmBus.back.aip
|
||||
/sdk
|
||||
*.aip
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -0,0 +1,3 @@
|
||||
[submodule "sdk"]
|
||||
path = sdk
|
||||
url = https://github.com/ViGEm/ViGEmClient.git
|
||||
|
||||
7
.vscode/settings.json
vendored
Normal file
7
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"dotnet.defaultSolution": "disable",
|
||||
"cSpell.words": [
|
||||
"Gamepads",
|
||||
"helpdesk"
|
||||
]
|
||||
}
|
||||
30
README.md
30
README.md
@@ -2,16 +2,15 @@
|
||||
|
||||
Windows kernel-mode driver emulating well-known USB game controllers.
|
||||
|
||||
[](https://ci.appveyor.com/project/nefarius/vigembus) [](https://somsubhra.github.io/github-release-stats/?username=ViGEm&repository=ViGEmBus) [](https://discord.vigem.org) [](https://vigem.org/) [](https://github.com/nefarius) [](https://twitter.com/nefariusmaximus)
|
||||
[](https://ci.appveyor.com/project/nefarius/vigembus) [](https://somsubhra.github.io/github-release-stats/?username=nefarius&repository=ViGEmBus) [](https://discord.nefarius.at) [](https://docs.nefarius.at/) [](https://github.com/nefarius) [](https://fosstodon.org/@Nefarius)
|
||||
|
||||
<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>
|
||||
---
|
||||
|
||||
Businesses: support continued development via invoiced technical support, maintenance, sponsoring contracts:
|
||||
<br> _E-mail: vigem @ nefarius dot at_
|
||||
## 🧟 THIS PROJECT HAS BEEN RETIRED 🧟
|
||||
|
||||
Individuals: support continued maintenance and development via [PayPal](https://paypal.me/NefariusMaximus) donations.
|
||||
Users of this software are encouraged to [read the end-of-life statement](https://docs.nefarius.at/projects/ViGEm/End-of-Life/). So long, cheers 🖖
|
||||
|
||||
----
|
||||
---
|
||||
|
||||
## About
|
||||
|
||||
@@ -19,7 +18,7 @@ The `ViGEmBus` driver and `ViGEmClient` libraries represent the core of the Virt
|
||||
|
||||
### Emulated devices
|
||||
|
||||
Currently supports emulation of the following USB Gamepads:
|
||||
Emulation of the following USB Gamepads is supported:
|
||||
|
||||
- [Microsoft Xbox 360 Controller](https://en.wikipedia.org/wiki/Xbox_360_controller)
|
||||
- [Sony DualShock 4 Controller](https://en.wikipedia.org/wiki/DualShock#DualShock_4)
|
||||
@@ -37,13 +36,17 @@ A few examples of the most common use cases for `ViGEm` are:
|
||||
|
||||
## Supported Systems
|
||||
|
||||
🛑 **Windows Server** might work but is **not supported** 🛑
|
||||
|
||||
Bug reports/support requests regarding running on a Server OS will be discarded.
|
||||
|
||||
### Version 1.16 and below
|
||||
|
||||
The driver is built for Windows 7/8.1/10/Server 2016/Server 2019 (x86 and amd64).
|
||||
The driver is built for Windows 7/8.1/10 (x86 and amd64).
|
||||
|
||||
### Version 1.17 and above
|
||||
|
||||
The driver is built for Windows 10/Server 2016/Server 2019 only (x86 and amd64).
|
||||
The driver is built for Windows 10/11 only (x86, amd64 and ARM64).
|
||||
|
||||
## License
|
||||
|
||||
@@ -68,15 +71,15 @@ Do bear in mind that you'll need to **sign** the driver to use it without [test
|
||||
|
||||
Found a bug and want it fixed? Open a detailed issue on the [GitHub issue tracker](../../issues)!
|
||||
|
||||
Have an idea for a new feature? Let's have a chat about your request on [Discord](https://discord.vigem.org) or the [community forums](https://forums.vigem.org).
|
||||
Have an idea for a new feature? Let's have a chat about your request on [Discord](https://discord.nefarius.at).
|
||||
|
||||
### Questions & Support
|
||||
|
||||
Please respect that the GitHub issue tracker isn't a helpdesk. We offer a [Discord server](https://discord.vigem.org) and [forums](https://forums.vigem.org), where you're welcome to check out and engage in discussions!
|
||||
Please respect that the GitHub issue tracker isn't a helpdesk. We offer a [range of support resources](https://docs.nefarius.at/Community-Support/) you're welcome to check out!
|
||||
|
||||
## Installation
|
||||
|
||||
Pre-built production-signed binaries are provided by `Nefarius Software Solutions e.U.` and [available as an all-in-one setup](../../releases/latest).
|
||||
Pre-built production-signed binaries **for Windows 10/11** are provided by `Nefarius Software Solutions e.U.` [as an all-in-one setup](../../releases/latest).
|
||||
|
||||
## Sponsors
|
||||
|
||||
@@ -84,7 +87,6 @@ Sponsors listed here have helped the project flourish by either financial suppor
|
||||
|
||||
- [3dRudder](https://www.3drudder.com/)
|
||||
- [Parsec](https://parsec.app/)
|
||||
- [Rainway, Inc](https://rainway.com/)
|
||||
- [JetBrains](https://www.jetbrains.com/resharper/)
|
||||
- [Advanced Installer](https://www.advancedinstaller.com/)
|
||||
- [ICAROS](https://www.icaros.com/)
|
||||
@@ -101,7 +103,6 @@ This list is non-exhaustive, if you'd like to see your project included, contact
|
||||
- [UCR](https://github.com/Snoothy/UCR)
|
||||
- [InputMapper](https://inputmapper.com/)
|
||||
- [Oculus VR, LLC.](https://www.oculus.com/)
|
||||
- [Rainway, Inc](https://rainway.com/)
|
||||
- [WiimoteHook](https://forum.cemu.info/showthread.php/140-WiimoteHook-Nintendo-Wii-Remote-with-Motion-Rumble-and-Nunchuk-support)
|
||||
- [XJoy](https://github.com/sam0x17/XJoy)
|
||||
- [HP](https://www8.hp.com/us/en/gaming/omen.html)
|
||||
@@ -113,3 +114,4 @@ This list is non-exhaustive, if you'd like to see your project included, contact
|
||||
- [BetterJoy](https://github.com/Davidobot/BetterJoy)
|
||||
- [Regame](https://github.com/ksyun-kenc/liuguang)
|
||||
- [NetInput](https://github.com/usertoroot/NetInput)
|
||||
- [NetJoy](https://github.com/Qcent/NetJoy/)
|
||||
|
||||
85
ViGEmBus.sln
85
ViGEmBus.sln
@@ -11,12 +11,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Driver", "Driver", "{0182EE
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ViGEmClient", "sdk\src\ViGEmClient.vcxproj", "{7DB06674-1F4F-464B-8E1C-172E9587F9DC}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Setup", "Setup", "{D138F6D3-3E59-49F6-8C6E-1C3AEB56CF7B}"
|
||||
EndProject
|
||||
Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "ViGEmBusSetup", "setup\ViGEmBusSetup.wixproj", "{C722B85E-FC7D-475F-A518-C8E13ECDB201}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{C2BA387E-D491-4FB7-8BEE-99D77E8949E7}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "App", "App", "{14E3C232-1A02-49B0-B9CE-4CA2023B7C3D}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "app", "app\app.vcxproj", "{74584E9B-2D99-439B-AF9A-27FD10154B33}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_DLL|ARM64 = Debug_DLL|ARM64
|
||||
@@ -99,8 +99,8 @@ Global
|
||||
{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|ARM64.ActiveCfg = Debug_LIB|Win32
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug_LIB|ARM64.Build.0 = Debug_LIB|Win32
|
||||
{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
|
||||
@@ -111,57 +111,24 @@ Global
|
||||
{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|ARM64.ActiveCfg = Release_DLL|Win32
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_DLL|ARM64.Build.0 = Release_DLL|Win32
|
||||
{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|ARM64.ActiveCfg = Release_LIB|Win32
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release_LIB|ARM64.Build.0 = Release_LIB|Win32
|
||||
{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|ARM64.ActiveCfg = Release_DLL|Win32
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|ARM64.Build.0 = Release_DLL|Win32
|
||||
{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
|
||||
@@ -180,6 +147,32 @@ Global
|
||||
{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
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|ARM64.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|ARM64.Build.0 = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|x64.ActiveCfg = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|x64.Build.0 = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|x86.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_DLL|x86.Build.0 = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|ARM64.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|ARM64.Build.0 = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|x64.ActiveCfg = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|x64.Build.0 = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|x86.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug_LIB|x86.Build.0 = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug|ARM64.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug|x64.Build.0 = Debug|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug|x86.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Debug|x86.Build.0 = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_DLL|ARM64.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_DLL|x64.ActiveCfg = Release|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_DLL|x86.ActiveCfg = Release|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_LIB|ARM64.ActiveCfg = Debug|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_LIB|x64.ActiveCfg = Release|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release_LIB|x86.ActiveCfg = Release|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release|ARM64.ActiveCfg = Release|Win32
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release|x64.ActiveCfg = Release|x64
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33}.Release|x86.ActiveCfg = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -187,7 +180,7 @@ Global
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{040101B0-EE5C-4EF1-99EE-9F81C795C001} = {0182EE0E-A2FB-4525-9FEA-1910B12B21C8}
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC} = {733360FF-9D9F-4C67-86D1-B20881C17000}
|
||||
{C722B85E-FC7D-475F-A518-C8E13ECDB201} = {D138F6D3-3E59-49F6-8C6E-1C3AEB56CF7B}
|
||||
{74584E9B-2D99-439B-AF9A-27FD10154B33} = {14E3C232-1A02-49B0-B9CE-4CA2023B7C3D}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D5CD61FD-80BB-4E0E-840C-BAF66ABB1CF0}
|
||||
|
||||
17
ViGEmBus.sln.DotSettings
Normal file
17
ViGEmBus.sln.DotSettings
Normal file
@@ -0,0 +1,17 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=DPAD/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=gamepad/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Lightbar/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=megadrago/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=NTSTATUS/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PEMULATION/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PPDO/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=PVIGEM/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=TOUCHPAD/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=unregister/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=USERINDEX/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=VIGEM/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=waitable/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=WINAPI/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xbox/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Xusb/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
53
app/app.cpp
Normal file
53
app/app.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
// app.cpp : This file contains the 'main' function. Program execution begins and ends there.
|
||||
//
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <iomanip>
|
||||
#include <Windows.h>
|
||||
#include <ViGEm/Client.h>
|
||||
#include <iostream>
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <thread>
|
||||
#include <bitset>
|
||||
|
||||
#pragma comment(lib, "setupapi.lib")
|
||||
|
||||
static std::string hexStr(unsigned char* data, int len)
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << std::hex;
|
||||
for (int i = 0; i < len; ++i)
|
||||
ss << std::setw(2) << std::setfill('0') << static_cast<int>(data[i]) << ' ';
|
||||
return ss.str();
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
const auto client = vigem_alloc();
|
||||
|
||||
auto error = vigem_connect(client);
|
||||
|
||||
const auto ds4 = vigem_target_ds4_alloc();
|
||||
|
||||
error = vigem_target_add(client, ds4);
|
||||
|
||||
DS4_OUTPUT_BUFFER out;
|
||||
|
||||
while (TRUE)
|
||||
{
|
||||
//error = vigem_target_ds4_await_output_report(client, ds4, &out);
|
||||
error = vigem_target_ds4_await_output_report_timeout(client, ds4, 100, &out);
|
||||
|
||||
if (VIGEM_SUCCESS(error))
|
||||
{
|
||||
std::cout << hexStr(out.Buffer, sizeof(DS4_OUTPUT_BUFFER)) << std::endl;
|
||||
}
|
||||
else if (error != VIGEM_ERROR_TIMED_OUT)
|
||||
{
|
||||
auto win32 = GetLastError();
|
||||
|
||||
auto t = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
160
app/app.vcxproj
Normal file
160
app/app.vcxproj
Normal file
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Debug|Win32">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|Win32">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug|x64">
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release|x64">
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<VCProjectVersion>16.0</VCProjectVersion>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<ProjectGuid>{74584e9b-2d99-439b-af9a-27fd10154b33}</ProjectGuid>
|
||||
<RootNamespace>app</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<ConfigurationType>Application</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<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|Win32'">
|
||||
<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)'=='Debug|x64'">
|
||||
<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|x64'">
|
||||
<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|Win32'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<LinkIncremental>true</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)sdk\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)sdk\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)sdk\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<ConformanceMode>true</ConformanceMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)sdk\include</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Console</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
<GenerateDebugInformation>true</GenerateDebugInformation>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="app.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\sdk\src\ViGEmClient.vcxproj">
|
||||
<Project>{7db06674-1f4f-464b-8e1c-172e9587f9dc}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
22
app/app.vcxproj.filters
Normal file
22
app/app.vcxproj.filters
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="app.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,10 +1,12 @@
|
||||
version: 1.18.{build}.0
|
||||
version: 1.21.{build}.0
|
||||
image: Visual Studio 2019
|
||||
skip_commits:
|
||||
files:
|
||||
- '**/*.md'
|
||||
- '**/*.aip'
|
||||
cache:
|
||||
- C:\projects\DMF
|
||||
- C:\projects\ViGEmBus\vpatch.exe
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
@@ -14,13 +16,12 @@ configuration:
|
||||
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
|
||||
- cmd: git submodule -q update --init
|
||||
- cmd: git clone -q https://github.com/microsoft/DMF.git C:\projects\DMF 2> nul || set ERRORLEVEL=0
|
||||
- cmd: |
|
||||
cd "C:\projects\DMF"
|
||||
git pull > NUL
|
||||
git apply --reject "%APPVEYOR_BUILD_FOLDER%\patches\dmf.diff
|
||||
cd %appveyor_build_folder%
|
||||
before_build:
|
||||
- ps: Invoke-WebRequest "https://github.com/nefarius/vpatch/releases/latest/download/vpatch.exe" -OutFile vpatch.exe
|
||||
@@ -35,7 +36,6 @@ artifacts:
|
||||
- path: 'bin**\$(APPVEYOR_PROJECT_NAME)\*.sys'
|
||||
- path: 'bin**\*.pdb'
|
||||
- path: 'disk1\*.cab'
|
||||
- path: 'bin**\*.msi'
|
||||
deploy:
|
||||
- provider: Environment
|
||||
name: BUILDBOT
|
||||
|
||||
Binary file not shown.
Binary file not shown.
647
patches/dmf.diff
Normal file
647
patches/dmf.diff
Normal file
@@ -0,0 +1,647 @@
|
||||
Dmf/Solution/DmfK/DmfK.vcxproj | 28 +++++++++++++++++-----
|
||||
Dmf/Solution/DmfKFramework/DmfKFramework.vcxproj | 28 +++++++++++++++++-----
|
||||
.../DmfKModules.Library.vcxproj | 28 +++++++++++++++++-----
|
||||
.../DmfKModules.Template.vcxproj | 28 +++++++++++++++++-----
|
||||
Dmf/Solution/DmfU/DmfU.vcxproj | 18 +++++++++++++-
|
||||
Dmf/Solution/DmfUFramework/DmfUFramework.vcxproj | 28 +++++++++++++++++-----
|
||||
.../DmfUModules.Library.vcxproj | 28 +++++++++++++++++-----
|
||||
.../DmfUModules.Template.vcxproj | 24 +++++++++++++++----
|
||||
8 files changed, 169 insertions(+), 41 deletions(-)
|
||||
|
||||
diff --git a/Dmf/Solution/DmfK/DmfK.vcxproj b/Dmf/Solution/DmfK/DmfK.vcxproj
|
||||
index 738397c..de0b165 100644
|
||||
--- a/Dmf/Solution/DmfK/DmfK.vcxproj
|
||||
+++ b/Dmf/Solution/DmfK/DmfK.vcxproj
|
||||
@@ -44,37 +44,37 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -110,6 +110,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -139,6 +142,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -169,6 +175,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -199,6 +207,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -228,6 +239,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -258,6 +272,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
diff --git a/Dmf/Solution/DmfKFramework/DmfKFramework.vcxproj b/Dmf/Solution/DmfKFramework/DmfKFramework.vcxproj
|
||||
index 13d2475..b2d481c 100644
|
||||
--- a/Dmf/Solution/DmfKFramework/DmfKFramework.vcxproj
|
||||
+++ b/Dmf/Solution/DmfKFramework/DmfKFramework.vcxproj
|
||||
@@ -80,37 +80,37 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -147,6 +147,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -174,6 +177,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -202,6 +208,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -230,6 +238,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -257,6 +268,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -285,6 +299,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
diff --git a/Dmf/Solution/DmfKModules.Library/DmfKModules.Library.vcxproj b/Dmf/Solution/DmfKModules.Library/DmfKModules.Library.vcxproj
|
||||
index 1ba20c5..ec7dbed 100644
|
||||
--- a/Dmf/Solution/DmfKModules.Library/DmfKModules.Library.vcxproj
|
||||
+++ b/Dmf/Solution/DmfKModules.Library/DmfKModules.Library.vcxproj
|
||||
@@ -167,37 +167,37 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -234,6 +234,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -263,6 +266,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -293,6 +299,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -323,6 +331,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -352,6 +363,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -382,6 +396,8 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
diff --git a/Dmf/Solution/DmfKModules.Template/DmfKModules.Template.vcxproj b/Dmf/Solution/DmfKModules.Template/DmfKModules.Template.vcxproj
|
||||
index 0d0ef4c..ce1f791 100644
|
||||
--- a/Dmf/Solution/DmfKModules.Template/DmfKModules.Template.vcxproj
|
||||
+++ b/Dmf/Solution/DmfKModules.Template/DmfKModules.Template.vcxproj
|
||||
@@ -44,13 +44,13 @@
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
<PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -84,6 +84,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -108,6 +111,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -132,13 +138,15 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);setupapi.lib;cfgmgr32.lib;wpprecorder.lib;</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
@@ -158,6 +166,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -182,6 +193,9 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
@@ -206,13 +220,15 @@
|
||||
<DebugInformationFormat>OldStyle</DebugInformationFormat>
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <Optimization>MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);setupapi.lib;cfgmgr32.lib;wpprecorder.lib;</AdditionalDependencies>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
<ProjectReference>
|
||||
<UseLibraryDependencyInputs>false</UseLibraryDependencyInputs>
|
||||
diff --git a/Dmf/Solution/DmfU/DmfU.vcxproj b/Dmf/Solution/DmfU/DmfU.vcxproj
|
||||
index 9b9dd48..521b273 100644
|
||||
--- a/Dmf/Solution/DmfU/DmfU.vcxproj
|
||||
+++ b/Dmf/Solution/DmfU/DmfU.vcxproj
|
||||
@@ -46,7 +46,7 @@
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
<UseDebugLibraries Condition="'$(Configuration)'=='Release'">False</UseDebugLibraries>
|
||||
<UseDebugLibraries Condition="'$(Configuration)'=='Debug'">True</UseDebugLibraries>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -83,6 +83,22 @@
|
||||
<WppFileExtensions>.c.C.cpp.CPP.h.H</WppFileExtensions>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);..\..;</AdditionalIncludeDirectories>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<ClCompile Condition="'$(Platform)'=='ARM64'">
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
diff --git a/Dmf/Solution/DmfUFramework/DmfUFramework.vcxproj b/Dmf/Solution/DmfUFramework/DmfUFramework.vcxproj
|
||||
index 7ba02d9..cc174c6 100644
|
||||
--- a/Dmf/Solution/DmfUFramework/DmfUFramework.vcxproj
|
||||
+++ b/Dmf/Solution/DmfUFramework/DmfUFramework.vcxproj
|
||||
@@ -45,32 +45,32 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -125,6 +125,22 @@
|
||||
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(AdditionalIncludeDirectories);..\..\Framework;..\..\Framework\Modules.Core</AdditionalIncludeDirectories>
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppEnabled>true</WppEnabled>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<ClCompile Condition="'$(Platform)'=='ARM64'">
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
diff --git a/Dmf/Solution/DmfUModules.Library/DmfUModules.Library.vcxproj b/Dmf/Solution/DmfUModules.Library/DmfUModules.Library.vcxproj
|
||||
index 214e8bb..d863a9b 100644
|
||||
--- a/Dmf/Solution/DmfUModules.Library/DmfUModules.Library.vcxproj
|
||||
+++ b/Dmf/Solution/DmfUModules.Library/DmfUModules.Library.vcxproj
|
||||
@@ -45,32 +45,32 @@
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
@@ -141,6 +141,22 @@
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdcpp17</LanguageStandard>
|
||||
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Release|x64'">stdcpp17</LanguageStandard>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<ClCompile Condition="'$(Platform)'=='ARM64'">
|
||||
<AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
diff --git a/Dmf/Solution/DmfUModules.Template/DmfUModules.Template.vcxproj b/Dmf/Solution/DmfUModules.Template/DmfUModules.Template.vcxproj
|
||||
index 7c285cc..436bf4f 100644
|
||||
--- a/Dmf/Solution/DmfUModules.Template/DmfUModules.Template.vcxproj
|
||||
+++ b/Dmf/Solution/DmfUModules.Template/DmfUModules.Template.vcxproj
|
||||
@@ -45,12 +45,12 @@
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>WindowsUserModeDriver10.0</PlatformToolset>
|
||||
- <WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
+ <WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<PropertyGroup>
|
||||
@@ -84,9 +84,25 @@
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppEnabled>true</WppEnabled>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">Speed</FavorSizeOrSpeed>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</WholeProgramOptimization>
|
||||
+ <Optimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">MaxSpeed</Optimization>
|
||||
+ <FavorSizeOrSpeed Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Speed</FavorSizeOrSpeed>
|
||||
+ <WholeProgramOptimization Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<ClCompile Condition="'$(Platform)'=='ARM64'">
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/d2guardsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);hid.lib;setupapi.lib;cfgmgr32.lib;</AdditionalDependencies>
|
||||
@@ -94,7 +110,7 @@
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Platform)'=='ARM64'">
|
||||
<Link>
|
||||
- <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'" >/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
+ <AdditionalOptions Condition="'$(_NT_TARGET_VERSION)'=='$(_NT_TARGET_VERSION_WIN10_CO)'">/guard:delayloadsignret %(AdditionalOptions)</AdditionalOptions>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
1
sdk
Submodule
1
sdk
Submodule
Submodule sdk added at cb8c9f4787
29
sdk/.github/ISSUE_TEMPLATE/bug_report.md
vendored
29
sdk/.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,29 +0,0 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior (example):
|
||||
1. Start program '...'
|
||||
2. Click on '....'
|
||||
3. Plug in device '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**System details (please complete the following information):**
|
||||
- OS: [e.g. Windows 10 1803]
|
||||
- Feeder software: [e.g. VDX, DS4Windows, ...]
|
||||
- Driver Version: [e.g. 1.14.3.0]
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
17
sdk/.github/ISSUE_TEMPLATE/feature_request.md
vendored
17
sdk/.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -1,17 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
name: You need support
|
||||
about: This is the wrong place to ask for support
|
||||
|
||||
---
|
||||
|
||||
**Please don't abuse the issue tracker as a helpdesk!** We have a Discord server (linked in the README) where you can ask the lovely like-minded folks for assistance. Thank you for your compliance :smiley:
|
||||
@@ -1 +0,0 @@
|
||||
# TBD :smiley:
|
||||
70
sdk/.gitignore
vendored
70
sdk/.gitignore
vendored
@@ -1,70 +0,0 @@
|
||||
################################################################################
|
||||
# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
|
||||
################################################################################
|
||||
|
||||
/.vs/ViGEmBus/v15
|
||||
/build/bin/Release
|
||||
/build/obj/Release
|
||||
/lib
|
||||
/packages
|
||||
/sys/x64/Release
|
||||
/x64/Release
|
||||
/x64/Release (dynamic)
|
||||
/x64/Release (static)
|
||||
/.tmp
|
||||
/lib/Release (static)
|
||||
/Release
|
||||
/sys/Release
|
||||
/Release (static)
|
||||
/build/bin/Debug
|
||||
/build/obj/Debug
|
||||
/bin
|
||||
/sys/x64
|
||||
/x64
|
||||
*.user
|
||||
/.vs/config
|
||||
/sys/RCa21300
|
||||
/sys/RCb21300
|
||||
/build/*.dotsettings
|
||||
/artifacts
|
||||
/.vs/ViGEmBus/DesignTimeBuild
|
||||
/build/obj
|
||||
/.vs/ViGEmClient
|
||||
/src/Release (static)
|
||||
/src/x64/Debug (static)
|
||||
/src/x64/Release (dynamic)
|
||||
/src/x64/Release (static)
|
||||
*.TMP
|
||||
/src/Debug_LIB
|
||||
/src/x64/Debug_LIB
|
||||
/x64/Debug_LIB
|
||||
/Debug_LIB
|
||||
*.aps
|
||||
/Release_LIB
|
||||
/src/Release_LIB
|
||||
/src/x64
|
||||
/src/Debug_DLL
|
||||
/src/Release_DLL
|
||||
/app/Tester/Debug
|
||||
/Debug
|
||||
/app/Tester/x64/Debug
|
||||
/app/Tester/x64/Release/Tester.tlog
|
||||
/app/Tester/x64/Release/Tester.log
|
||||
/app/Tester/x64/Release/Tester.obj
|
||||
/app/Tester/x64/Release/vc141.pdb
|
||||
/app/Tester/x64/Release/vcpkg.applocal.log
|
||||
/app/Tester/Release/Tester.tlog/CL.command.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/CL.read.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/CL.write.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/link.command.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/link.read.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/link.write.1.tlog
|
||||
/app/Tester/Release/Tester.tlog/Tester.lastbuildstate
|
||||
/app/Tester/Release/Tester.tlog/Tester.write.1u.tlog
|
||||
/app/Tester/Release/Tester.Build.CppClean.log
|
||||
/app/Tester/Release/Tester.log
|
||||
/app/Tester/Release/Tester.obj
|
||||
/app/Tester/Release/vc141.pdb
|
||||
/app/Tester/Release/vcpkg.applocal.log
|
||||
/app/Tester/x64/Release/Tester.Build.CppClean.log
|
||||
/app/Tester/x64/Release
|
||||
21
sdk/LICENSE
21
sdk/LICENSE
@@ -1,21 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Benjamin Höglinger-Stelzer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
194
sdk/README.md
194
sdk/README.md
@@ -1,194 +0,0 @@
|
||||
# ViGEm Client Native SDK
|
||||
|
||||
C/C++ developer SDK for communication with [`ViGEmBus`](https://github.com/ViGEm/ViGEmBus).
|
||||
|
||||
[](https://ci.appveyor.com/project/nefarius/vigemclient) [](https://discord.vigem.org)
|
||||
|
||||
## About
|
||||
|
||||
**TL;DR:** use this if you want to create virtual game controllers from your C/C++ application 😊
|
||||
|
||||
The `ViGEmClient` provides a small library exposing a simple API for creating and "feeding" (periodically updating it with new input data) virtual game controllers through [`ViGEmBus`](https://github.com/ViGEm/ViGEmBus). The library takes care of discovering a compatible instance of the bus driver on the users system and abstracting away the inner workings of the emulation framework. You can use and distribute it with your project as either a static component (recommended) or a dynamic library (DLL). This library is **not** thread-safe, ensure proper synchronization in a multi-threaded environment.
|
||||
|
||||
## How to build
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Visual Studio **2019** ([Community Edition](https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=16) is just fine)
|
||||
- When linking statically, make sure to also link against `setupapi.lib`
|
||||
|
||||
## Contribute
|
||||
|
||||
### Bugs & Features
|
||||
|
||||
Found a bug and want it fixed? Open a detailed issue on the [GitHub issue tracker](../../issues)!
|
||||
|
||||
Have an idea for a new feature? Let's have a chat about your request on [Discord](https://discord.vigem.org) or the [community forums](https://forums.vigem.org).
|
||||
|
||||
### Questions & Support
|
||||
|
||||
Please respect that the GitHub issue tracker isn't a helpdesk. We offer a [Discord server](https://discord.vigem.org) and [forums](https://forums.vigem.org), where you're welcome to check out and engage in discussions!
|
||||
|
||||
## How to use
|
||||
|
||||
### Integration
|
||||
|
||||
Integrating this library into your project is pretty straight-forward, there are no additional 3rd party dependencies. You can either `git submodule` or `git subtree` this repository directly into your source tree or use the provided [`vcpkg`](https://github.com/microsoft/vcpkg) package manager integration [found here](https://github.com/ViGEm/ViGEmClient.vcpkg) (recommended, can be updates with ease). The library tries to handle driver compatibility internally so static linking is recommended to avoid DLL hell 😊
|
||||
|
||||
### API usage
|
||||
|
||||
For a general overview of the provided types and functions [take a look at the main include file](./include/ViGEm/Client.h).
|
||||
|
||||
Now, onwards to a practical example 😉 First, include some basic headers:
|
||||
|
||||
```cpp
|
||||
//
|
||||
// Windows basic types 'n' fun
|
||||
//
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
//
|
||||
// Optional depending on your use case
|
||||
//
|
||||
#include <Xinput.h>
|
||||
|
||||
//
|
||||
// The ViGEm API
|
||||
//
|
||||
#include <ViGEm/Client.h>
|
||||
|
||||
//
|
||||
// Link against SetupAPI
|
||||
//
|
||||
#pragma comment(lib, "setupapi.lib")
|
||||
```
|
||||
|
||||
To initialize the API call `vigem_alloc` which gives you an opaque handle to the underlying driver:
|
||||
|
||||
```cpp
|
||||
const auto client = vigem_alloc();
|
||||
|
||||
if (client == nullptr)
|
||||
{
|
||||
std::cerr << "Uh, not enough memory to do that?!" << std::endl;
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
|
||||
Establish connection to the driver:
|
||||
|
||||
```cpp
|
||||
const auto retval = vigem_connect(client);
|
||||
|
||||
if (!VIGEM_SUCCESS(retval))
|
||||
{
|
||||
std::cerr << "ViGEm Bus connection failed with error code: 0x" << std::hex << retval << std::endl;
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
|
||||
👉 Note: this is an "expensive" operation, it's recommended you do this once in your project, not every frame for performance benefits.
|
||||
|
||||
---
|
||||
|
||||
With this handle we're prepared to spawn (connect) and feed (supply with periodic input updates) one or many emulated controller devices. So let's spawn an Xbox 360 controller:
|
||||
|
||||
```cpp
|
||||
//
|
||||
// Allocate handle to identify new pad
|
||||
//
|
||||
const auto pad = vigem_target_x360_alloc();
|
||||
|
||||
//
|
||||
// Add client to the bus, this equals a plug-in event
|
||||
//
|
||||
const auto pir = vigem_target_add(client, pad);
|
||||
|
||||
//
|
||||
// Error handling
|
||||
//
|
||||
if (!VIGEM_SUCCESS(pir))
|
||||
{
|
||||
std::cerr << "Target plugin failed with error code: 0x" << std::hex << retval << std::endl;
|
||||
return -1;
|
||||
}
|
||||
|
||||
XINPUT_STATE state;
|
||||
|
||||
//
|
||||
// Grab the input from a physical X36ß pad in this example
|
||||
//
|
||||
XInputGetState(0, &state);
|
||||
|
||||
//
|
||||
// The XINPUT_GAMEPAD structure is identical to the XUSB_REPORT structure
|
||||
// so we can simply take it "as-is" and cast it.
|
||||
//
|
||||
// Call this function on every input state change e.g. in a loop polling
|
||||
// another joystick or network device or thermometer or... you get the idea.
|
||||
//
|
||||
vigem_target_x360_update(client, pad, *reinterpret_cast<XUSB_REPORT*>(&state.Gamepad));
|
||||
|
||||
//
|
||||
// We're done with this pad, free resources (this disconnects the virtual device)
|
||||
//
|
||||
vigem_target_remove(client, pad);
|
||||
vigem_target_free(pad);
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
Alright, so we got the feeding side of things done, but what about the other direction? After all, the virtual device can receive some state changes as well (for the Xbox 360 device the LED ring can change and rumble/vibration requests can arrive) and this information is of interest for us. This is achieved by defining a notification callback like so:
|
||||
|
||||
```cpp
|
||||
//
|
||||
// Define the callback function
|
||||
//
|
||||
VOID CALLBACK notification(
|
||||
PVIGEM_CLIENT Client,
|
||||
PVIGEM_TARGET Target,
|
||||
UCHAR LargeMotor,
|
||||
UCHAR SmallMotor,
|
||||
UCHAR LedNumber,
|
||||
LPVOID UserData
|
||||
)
|
||||
{
|
||||
static int count = 1;
|
||||
|
||||
std::cout.width(3);
|
||||
std::cout << count++ << " ";
|
||||
std::cout.width(3);
|
||||
std::cout << (int)LargeMotor << " ";
|
||||
std::cout.width(3);
|
||||
std::cout << (int)SmallMotor << std::endl;
|
||||
}
|
||||
```
|
||||
|
||||
Register it:
|
||||
|
||||
```cpp
|
||||
const auto retval = vigem_target_x360_register_notification(client, pad, ¬ification, nullptr);
|
||||
|
||||
//
|
||||
// Error handling
|
||||
//
|
||||
if (!VIGEM_SUCCESS(retval))
|
||||
{
|
||||
std::cerr << "Registering for notification failed with error code: 0x" << std::hex << retval << std::endl;
|
||||
return -1;
|
||||
}
|
||||
```
|
||||
|
||||
The function `notification` will now get invoked every time a rumble request was sent to the virtual controller and can get handled accordingly. This is a blocking call and the invocation will take place in the order the underlying requests arrived.
|
||||
|
||||
---
|
||||
|
||||
Once ViGEm interaction is no longer required (e.g. the application is about to end) the acquired resources need to be freed properly:
|
||||
|
||||
```cpp
|
||||
vigem_disconnect(client);
|
||||
vigem_free(client);
|
||||
```
|
||||
|
||||
After that the `client` handle will become invalid and must not be used again.
|
||||
@@ -1,55 +0,0 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.29709.97
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ViGEmClient", "src\ViGEmClient.vcxproj", "{7DB06674-1F4F-464B-8E1C-172E9587F9DC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug_DLL|x64 = Debug_DLL|x64
|
||||
Debug_DLL|x86 = Debug_DLL|x86
|
||||
Debug_LIB|x64 = Debug_LIB|x64
|
||||
Debug_LIB|x86 = Debug_LIB|x86
|
||||
Debug|x64 = Debug|x64
|
||||
Debug|x86 = Debug|x86
|
||||
Release_DLL|x64 = Release_DLL|x64
|
||||
Release_DLL|x86 = Release_DLL|x86
|
||||
Release_LIB|x64 = Release_LIB|x64
|
||||
Release_LIB|x86 = Release_LIB|x86
|
||||
Release|x64 = Release|x64
|
||||
Release|x86 = Release|x86
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{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|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|x64.ActiveCfg = Debug_LIB|x64
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Debug|x64.Build.0 = Debug_LIB|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|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|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|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_LIB|Win32
|
||||
{7DB06674-1F4F-464B-8E1C-172E9587F9DC}.Release|x86.Build.0 = Release_LIB|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D5CD61FD-80BB-4E0E-840C-BAF66ABB1CF0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -1,24 +0,0 @@
|
||||
version: 1.17.{build}.0
|
||||
image: Visual Studio 2019
|
||||
platform:
|
||||
- x86
|
||||
- x64
|
||||
configuration:
|
||||
- Release_DLL
|
||||
install:
|
||||
- cmd: git submodule -q update --init
|
||||
before_build:
|
||||
- ps: Invoke-WebRequest "https://github.com/nefarius/vpatch/releases/latest/download/vpatch.exe" -OutFile vpatch.exe
|
||||
- cmd: vpatch.exe --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file ".\src\%APPVEYOR_PROJECT_NAME%.vcxproj" --vcxproj.inf-time-stamp
|
||||
- cmd: vpatch.exe --stamp-version "%APPVEYOR_BUILD_VERSION%" --target-file ".\src\%APPVEYOR_PROJECT_NAME%.rc" --resource.file-version --resource.product-version
|
||||
build:
|
||||
project: $(APPVEYOR_BUILD_FOLDER)\$(APPVEYOR_PROJECT_NAME).sln
|
||||
artifacts:
|
||||
- path: 'bin**\*.lib'
|
||||
- path: 'bin**\*.dll'
|
||||
- path: 'bin**\*.pdb'
|
||||
deploy:
|
||||
- provider: Environment
|
||||
name: BUILDBOT
|
||||
on:
|
||||
appveyor_repo_tag: true
|
||||
@@ -1,456 +0,0 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2019 Nefarius Software Solutions e.U. and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef ViGEmClient_h__
|
||||
#define ViGEmClient_h__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include "ViGEm/Common.h"
|
||||
|
||||
#ifdef VIGEM_DYNAMIC
|
||||
#ifdef VIGEM_EXPORTS
|
||||
#define VIGEM_API __declspec(dllexport)
|
||||
#else
|
||||
#define VIGEM_API __declspec(dllimport)
|
||||
#endif
|
||||
#else
|
||||
#define VIGEM_API
|
||||
#endif
|
||||
|
||||
/** Values that represent ViGEm errors */
|
||||
typedef enum _VIGEM_ERRORS
|
||||
{
|
||||
VIGEM_ERROR_NONE = 0x20000000,
|
||||
VIGEM_ERROR_BUS_NOT_FOUND = 0xE0000001,
|
||||
VIGEM_ERROR_NO_FREE_SLOT = 0xE0000002,
|
||||
VIGEM_ERROR_INVALID_TARGET = 0xE0000003,
|
||||
VIGEM_ERROR_REMOVAL_FAILED = 0xE0000004,
|
||||
VIGEM_ERROR_ALREADY_CONNECTED = 0xE0000005,
|
||||
VIGEM_ERROR_TARGET_UNINITIALIZED = 0xE0000006,
|
||||
VIGEM_ERROR_TARGET_NOT_PLUGGED_IN = 0xE0000007,
|
||||
VIGEM_ERROR_BUS_VERSION_MISMATCH = 0xE0000008,
|
||||
VIGEM_ERROR_BUS_ACCESS_FAILED = 0xE0000009,
|
||||
VIGEM_ERROR_CALLBACK_ALREADY_REGISTERED = 0xE0000010,
|
||||
VIGEM_ERROR_CALLBACK_NOT_FOUND = 0xE0000011,
|
||||
VIGEM_ERROR_BUS_ALREADY_CONNECTED = 0xE0000012,
|
||||
VIGEM_ERROR_BUS_INVALID_HANDLE = 0xE0000013,
|
||||
VIGEM_ERROR_XUSB_USERINDEX_OUT_OF_RANGE = 0xE0000014,
|
||||
VIGEM_ERROR_INVALID_PARAMETER = 0xE0000015,
|
||||
VIGEM_ERROR_NOT_SUPPORTED = 0xE0000016
|
||||
|
||||
} VIGEM_ERROR;
|
||||
|
||||
/**
|
||||
* A macro that defines if the API succeeded
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 01.09.2020
|
||||
*
|
||||
* @param _val_ The error value.
|
||||
*/
|
||||
#define VIGEM_SUCCESS(_val_) (_val_ == VIGEM_ERROR_NONE)
|
||||
|
||||
/** Defines an alias representing a driver connection object */
|
||||
typedef struct _VIGEM_CLIENT_T *PVIGEM_CLIENT;
|
||||
|
||||
/** Defines an alias representing a target device object */
|
||||
typedef struct _VIGEM_TARGET_T *PVIGEM_TARGET;
|
||||
|
||||
typedef
|
||||
_Function_class_(EVT_VIGEM_TARGET_ADD_RESULT)
|
||||
VOID CALLBACK
|
||||
EVT_VIGEM_TARGET_ADD_RESULT(
|
||||
PVIGEM_CLIENT Client,
|
||||
PVIGEM_TARGET Target,
|
||||
VIGEM_ERROR Result
|
||||
);
|
||||
|
||||
typedef EVT_VIGEM_TARGET_ADD_RESULT *PFN_VIGEM_TARGET_ADD_RESULT;
|
||||
|
||||
typedef
|
||||
_Function_class_(EVT_VIGEM_X360_NOTIFICATION)
|
||||
VOID CALLBACK
|
||||
EVT_VIGEM_X360_NOTIFICATION(
|
||||
PVIGEM_CLIENT Client,
|
||||
PVIGEM_TARGET Target,
|
||||
UCHAR LargeMotor,
|
||||
UCHAR SmallMotor,
|
||||
UCHAR LedNumber,
|
||||
LPVOID UserData
|
||||
);
|
||||
|
||||
typedef EVT_VIGEM_X360_NOTIFICATION *PFN_VIGEM_X360_NOTIFICATION;
|
||||
|
||||
typedef
|
||||
_Function_class_(EVT_VIGEM_DS4_NOTIFICATION)
|
||||
VOID CALLBACK
|
||||
EVT_VIGEM_DS4_NOTIFICATION(
|
||||
PVIGEM_CLIENT Client,
|
||||
PVIGEM_TARGET Target,
|
||||
UCHAR LargeMotor,
|
||||
UCHAR SmallMotor,
|
||||
DS4_LIGHTBAR_COLOR LightbarColor,
|
||||
LPVOID UserData
|
||||
);
|
||||
|
||||
typedef EVT_VIGEM_DS4_NOTIFICATION *PFN_VIGEM_DS4_NOTIFICATION;
|
||||
|
||||
/**
|
||||
* Allocates an object representing a driver connection
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @returns A PVIGEM_CLIENT object.
|
||||
*/
|
||||
VIGEM_API PVIGEM_CLIENT vigem_alloc(void);
|
||||
|
||||
/**
|
||||
* Frees up memory used by the driver connection object
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The PVIGEM_CLIENT object.
|
||||
*/
|
||||
VIGEM_API void vigem_free(PVIGEM_CLIENT vigem);
|
||||
|
||||
/**
|
||||
* Initializes the driver object and establishes a connection to the emulation bus
|
||||
* driver. Returns an error if no compatible bus device has been found.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The PVIGEM_CLIENT object.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_connect(PVIGEM_CLIENT vigem);
|
||||
|
||||
/**
|
||||
* Disconnects from the bus device and resets the driver object state. The driver object
|
||||
* may be reused again after calling this function. When called, all targets which may
|
||||
* still be connected will be destroyed automatically. Be aware, that allocated target
|
||||
* objects won't be automatically freed, this has to be taken care of by the caller.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The PVIGEM_CLIENT object.
|
||||
*/
|
||||
VIGEM_API void vigem_disconnect(PVIGEM_CLIENT vigem);
|
||||
|
||||
/**
|
||||
* Allocates an object representing an Xbox 360 Controller device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @returns A PVIGEM_TARGET representing an Xbox 360 Controller device.
|
||||
*/
|
||||
VIGEM_API PVIGEM_TARGET vigem_target_x360_alloc(void);
|
||||
|
||||
/**
|
||||
* Allocates an object representing a DualShock 4 Controller device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @returns A PVIGEM_TARGET representing a DualShock 4 Controller device.
|
||||
*/
|
||||
VIGEM_API PVIGEM_TARGET vigem_target_ds4_alloc(void);
|
||||
|
||||
/**
|
||||
* Frees up memory used by the target device object. This does not automatically remove
|
||||
* the associated device from the bus, if present. If the target device doesn't get
|
||||
* removed before this call, the device becomes orphaned until the owning process is
|
||||
* terminated.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*/
|
||||
VIGEM_API void vigem_target_free(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Adds a provided target device to the bus driver, which is equal to a device plug-in
|
||||
* event of a physical hardware device. This function blocks until the target device is
|
||||
* in full operational mode.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_add(PVIGEM_CLIENT vigem, PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Adds a provided target device to the bus driver, which is equal to a device plug-in
|
||||
* event of a physical hardware device. This function immediately returns. An optional
|
||||
* callback may be registered which gets called on error or if the target device has
|
||||
* become fully operational.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param result An optional function getting called when the target device becomes available.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_add_async(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PFN_VIGEM_TARGET_ADD_RESULT result);
|
||||
|
||||
/**
|
||||
* Removes a provided target device from the bus driver, which is equal to a device
|
||||
* unplug event of a physical hardware device. The target device object may be reused
|
||||
* after this function is called. If this function is never called on target device
|
||||
* objects, they will be removed from the bus when the owning process terminates.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_remove(PVIGEM_CLIENT vigem, PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Registers a function which gets called, when LED index or vibration state changes
|
||||
* occur on the provided target device. This function fails if the provided
|
||||
* target device isn't fully operational or in an erroneous state.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param notification The notification callback.
|
||||
* @param userData The user data passed to the notification callback.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_x360_register_notification(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PFN_VIGEM_X360_NOTIFICATION notification, LPVOID userData);
|
||||
|
||||
/**
|
||||
* Registers a function which gets called, when LightBar or vibration state changes
|
||||
* occur on the provided target device. This function fails if the provided
|
||||
* target device isn't fully operational or in an erroneous state.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param notification The notification callback.
|
||||
* @param userData The user data passed to the notification callback.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_ds4_register_notification(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PFN_VIGEM_DS4_NOTIFICATION notification, LPVOID userData);
|
||||
|
||||
/**
|
||||
* Removes a previously registered callback function from the provided target object.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*/
|
||||
VIGEM_API void vigem_target_x360_unregister_notification(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Removes a previously registered callback function from the provided target object.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*/
|
||||
VIGEM_API void vigem_target_ds4_unregister_notification(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Overrides the default Vendor ID value with the provided one.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
* @param vid The Vendor ID to set.
|
||||
*/
|
||||
VIGEM_API void vigem_target_set_vid(PVIGEM_TARGET target, USHORT vid);
|
||||
|
||||
/**
|
||||
* Overrides the default Product ID value with the provided one.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
* @param pid The Product ID to set.
|
||||
*/
|
||||
VIGEM_API void vigem_target_set_pid(PVIGEM_TARGET target, USHORT pid);
|
||||
|
||||
/**
|
||||
* Returns the Vendor ID of the provided target device object.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns The Vendor ID.
|
||||
*/
|
||||
VIGEM_API USHORT vigem_target_get_vid(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Returns the Product ID of the provided target device object.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns The Product ID.
|
||||
*/
|
||||
VIGEM_API USHORT vigem_target_get_pid(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Sends a state report to the provided target device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param report The report to send to the target device.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_x360_update(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, XUSB_REPORT report);
|
||||
|
||||
/**
|
||||
* Sends a state report to the provided target device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param report The report to send to the target device.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_ds4_update(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, DS4_REPORT report);
|
||||
|
||||
/**
|
||||
* Sends a full size state report to the provided target device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger-Stelzer
|
||||
* @date 07.09.2020
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param report The report buffer.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_ds4_update_ex(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, DS4_REPORT_EX report);
|
||||
|
||||
/**
|
||||
* Returns the internal index (serial number) the bus driver assigned to the provided
|
||||
* target device object. Note that this value is specific to the inner workings of
|
||||
* the bus driver, it does not reflect related values like player index or device
|
||||
* arrival order experienced by other APIs. It may be used to identify the target
|
||||
* device object for its lifetime. This value becomes invalid once the target
|
||||
* device is removed from the bus and may change on the next addition of the
|
||||
* device.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns The internally used index of the target device.
|
||||
*/
|
||||
VIGEM_API ULONG vigem_target_get_index(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Returns the type of the provided target device object.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 28.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns A VIGEM_TARGET_TYPE.
|
||||
*/
|
||||
VIGEM_API VIGEM_TARGET_TYPE vigem_target_get_type(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Returns TRUE if the provided target device object is currently attached to the bus,
|
||||
* FALSE otherwise.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 30.08.2017
|
||||
*
|
||||
* @param target The target device object.
|
||||
*
|
||||
* @returns TRUE if device is attached to the bus, FALSE otherwise.
|
||||
*/
|
||||
VIGEM_API BOOL vigem_target_is_attached(PVIGEM_TARGET target);
|
||||
|
||||
/**
|
||||
* Returns the user index of the emulated Xenon device. This value correspondents to the
|
||||
* (zero-based) index number representing the player number via LED present on a
|
||||
* physical controller and is compatible to the dwUserIndex property of the
|
||||
* XInput* APIs.
|
||||
*
|
||||
* @author Benjamin "Nefarius" H<>glinger
|
||||
* @date 10.05.2018
|
||||
*
|
||||
* @param vigem The driver connection object.
|
||||
* @param target The target device object.
|
||||
* @param index The (zero-based) user index of the Xenon device.
|
||||
*
|
||||
* @returns A VIGEM_ERROR.
|
||||
*/
|
||||
VIGEM_API VIGEM_ERROR vigem_target_x360_get_user_index(PVIGEM_CLIENT vigem, PVIGEM_TARGET target, PULONG index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // ViGEmClient_h__
|
||||
@@ -1,256 +0,0 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2019 Nefarius Software Solutions e.U. and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// Represents the desired target type for the emulated device.
|
||||
//
|
||||
typedef enum _VIGEM_TARGET_TYPE
|
||||
{
|
||||
//
|
||||
// Microsoft Xbox 360 Controller (wired)
|
||||
//
|
||||
Xbox360Wired = 0,
|
||||
//
|
||||
// Sony DualShock 4 (wired)
|
||||
//
|
||||
DualShock4Wired = 2 // NOTE: 1 skipped on purpose to maintain compatibility
|
||||
|
||||
} VIGEM_TARGET_TYPE, *PVIGEM_TARGET_TYPE;
|
||||
|
||||
//
|
||||
// Possible XUSB report buttons.
|
||||
//
|
||||
typedef enum _XUSB_BUTTON
|
||||
{
|
||||
XUSB_GAMEPAD_DPAD_UP = 0x0001,
|
||||
XUSB_GAMEPAD_DPAD_DOWN = 0x0002,
|
||||
XUSB_GAMEPAD_DPAD_LEFT = 0x0004,
|
||||
XUSB_GAMEPAD_DPAD_RIGHT = 0x0008,
|
||||
XUSB_GAMEPAD_START = 0x0010,
|
||||
XUSB_GAMEPAD_BACK = 0x0020,
|
||||
XUSB_GAMEPAD_LEFT_THUMB = 0x0040,
|
||||
XUSB_GAMEPAD_RIGHT_THUMB = 0x0080,
|
||||
XUSB_GAMEPAD_LEFT_SHOULDER = 0x0100,
|
||||
XUSB_GAMEPAD_RIGHT_SHOULDER = 0x0200,
|
||||
XUSB_GAMEPAD_GUIDE = 0x0400,
|
||||
XUSB_GAMEPAD_A = 0x1000,
|
||||
XUSB_GAMEPAD_B = 0x2000,
|
||||
XUSB_GAMEPAD_X = 0x4000,
|
||||
XUSB_GAMEPAD_Y = 0x8000
|
||||
|
||||
} XUSB_BUTTON, *PXUSB_BUTTON;
|
||||
|
||||
//
|
||||
// Represents an XINPUT_GAMEPAD-compatible report structure.
|
||||
//
|
||||
typedef struct _XUSB_REPORT
|
||||
{
|
||||
USHORT wButtons;
|
||||
BYTE bLeftTrigger;
|
||||
BYTE bRightTrigger;
|
||||
SHORT sThumbLX;
|
||||
SHORT sThumbLY;
|
||||
SHORT sThumbRX;
|
||||
SHORT sThumbRY;
|
||||
|
||||
} XUSB_REPORT, *PXUSB_REPORT;
|
||||
|
||||
//
|
||||
// Initializes a _XUSB_REPORT structure.
|
||||
//
|
||||
VOID FORCEINLINE XUSB_REPORT_INIT(
|
||||
_Out_ PXUSB_REPORT Report
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Report, sizeof(XUSB_REPORT));
|
||||
}
|
||||
|
||||
//
|
||||
// The color value (RGB) of a DualShock 4 Lightbar
|
||||
//
|
||||
typedef struct _DS4_LIGHTBAR_COLOR
|
||||
{
|
||||
//
|
||||
// Red part of the Lightbar (0-255).
|
||||
//
|
||||
UCHAR Red;
|
||||
|
||||
//
|
||||
// Green part of the Lightbar (0-255).
|
||||
//
|
||||
UCHAR Green;
|
||||
|
||||
//
|
||||
// Blue part of the Lightbar (0-255).
|
||||
//
|
||||
UCHAR Blue;
|
||||
|
||||
} DS4_LIGHTBAR_COLOR, *PDS4_LIGHTBAR_COLOR;
|
||||
|
||||
//
|
||||
// DualShock 4 digital buttons
|
||||
//
|
||||
typedef enum _DS4_BUTTONS
|
||||
{
|
||||
DS4_BUTTON_THUMB_RIGHT = 1 << 15,
|
||||
DS4_BUTTON_THUMB_LEFT = 1 << 14,
|
||||
DS4_BUTTON_OPTIONS = 1 << 13,
|
||||
DS4_BUTTON_SHARE = 1 << 12,
|
||||
DS4_BUTTON_TRIGGER_RIGHT = 1 << 11,
|
||||
DS4_BUTTON_TRIGGER_LEFT = 1 << 10,
|
||||
DS4_BUTTON_SHOULDER_RIGHT = 1 << 9,
|
||||
DS4_BUTTON_SHOULDER_LEFT = 1 << 8,
|
||||
DS4_BUTTON_TRIANGLE = 1 << 7,
|
||||
DS4_BUTTON_CIRCLE = 1 << 6,
|
||||
DS4_BUTTON_CROSS = 1 << 5,
|
||||
DS4_BUTTON_SQUARE = 1 << 4
|
||||
|
||||
} DS4_BUTTONS, *PDS4_BUTTONS;
|
||||
|
||||
//
|
||||
// DualShock 4 special buttons
|
||||
//
|
||||
typedef enum _DS4_SPECIAL_BUTTONS
|
||||
{
|
||||
DS4_SPECIAL_BUTTON_PS = 1 << 0,
|
||||
DS4_SPECIAL_BUTTON_TOUCHPAD = 1 << 1
|
||||
|
||||
} DS4_SPECIAL_BUTTONS, *PDS4_SPECIAL_BUTTONS;
|
||||
|
||||
//
|
||||
// DualShock 4 directional pad (HAT) values
|
||||
//
|
||||
typedef enum _DS4_DPAD_DIRECTIONS
|
||||
{
|
||||
DS4_BUTTON_DPAD_NONE = 0x8,
|
||||
DS4_BUTTON_DPAD_NORTHWEST = 0x7,
|
||||
DS4_BUTTON_DPAD_WEST = 0x6,
|
||||
DS4_BUTTON_DPAD_SOUTHWEST = 0x5,
|
||||
DS4_BUTTON_DPAD_SOUTH = 0x4,
|
||||
DS4_BUTTON_DPAD_SOUTHEAST = 0x3,
|
||||
DS4_BUTTON_DPAD_EAST = 0x2,
|
||||
DS4_BUTTON_DPAD_NORTHEAST = 0x1,
|
||||
DS4_BUTTON_DPAD_NORTH = 0x0
|
||||
|
||||
} DS4_DPAD_DIRECTIONS, *PDS4_DPAD_DIRECTIONS;
|
||||
|
||||
//
|
||||
// DualShock 4 HID Input report
|
||||
//
|
||||
typedef struct _DS4_REPORT
|
||||
{
|
||||
BYTE bThumbLX;
|
||||
BYTE bThumbLY;
|
||||
BYTE bThumbRX;
|
||||
BYTE bThumbRY;
|
||||
USHORT wButtons;
|
||||
BYTE bSpecial;
|
||||
BYTE bTriggerL;
|
||||
BYTE bTriggerR;
|
||||
|
||||
} DS4_REPORT, *PDS4_REPORT;
|
||||
|
||||
//
|
||||
// Sets the current state of the D-PAD on a DualShock 4 report.
|
||||
//
|
||||
VOID FORCEINLINE DS4_SET_DPAD(
|
||||
_Out_ PDS4_REPORT Report,
|
||||
_In_ DS4_DPAD_DIRECTIONS Dpad
|
||||
)
|
||||
{
|
||||
Report->wButtons &= ~0xF;
|
||||
Report->wButtons |= (USHORT)Dpad;
|
||||
}
|
||||
|
||||
VOID FORCEINLINE DS4_REPORT_INIT(
|
||||
_Out_ PDS4_REPORT Report
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Report, sizeof(DS4_REPORT));
|
||||
|
||||
Report->bThumbLX = 0x80;
|
||||
Report->bThumbLY = 0x80;
|
||||
Report->bThumbRX = 0x80;
|
||||
Report->bThumbRY = 0x80;
|
||||
|
||||
DS4_SET_DPAD(Report, DS4_BUTTON_DPAD_NONE);
|
||||
}
|
||||
|
||||
#include <pshpack1.h> // pack structs tightly
|
||||
//
|
||||
// DualShock 4 HID Touchpad structure
|
||||
//
|
||||
typedef struct _DS4_TOUCH
|
||||
{
|
||||
BYTE bPacketCounter; // timestamp / packet counter associated with touch event
|
||||
BYTE bIsUpTrackingNum1; // 0 means down; active low
|
||||
// unique to each finger down, so for a lift and repress the value is incremented
|
||||
BYTE bTouchData1[3]; // Two 12 bits values (for X and Y)
|
||||
// middle byte holds last 4 bits of X and the starting 4 bits of Y
|
||||
BYTE bIsUpTrackingNum2; // second touch data immediately follows data of first touch
|
||||
BYTE bTouchData2[3]; // resolution is 1920x942
|
||||
} DS4_TOUCH, * PDS4_TOUCH;
|
||||
|
||||
//
|
||||
// DualShock 4 v1 complete HID Input report
|
||||
//
|
||||
typedef struct _DS4_REPORT_EX
|
||||
{
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
BYTE bThumbLX;
|
||||
BYTE bThumbLY;
|
||||
BYTE bThumbRX;
|
||||
BYTE bThumbRY;
|
||||
USHORT wButtons;
|
||||
BYTE bSpecial;
|
||||
BYTE bTriggerL;
|
||||
BYTE bTriggerR;
|
||||
USHORT wTimestamp;
|
||||
BYTE bBatteryLvl;
|
||||
SHORT wGyroX;
|
||||
SHORT wGyroY;
|
||||
SHORT wGyroZ;
|
||||
SHORT wAccelX;
|
||||
SHORT wAccelY;
|
||||
SHORT wAccelZ;
|
||||
BYTE _bUnknown1[5];
|
||||
BYTE bBatteryLvlSpecial;
|
||||
// really should have a enum to show everything that this can represent (USB charging, battery level; EXT, headset, microphone connected)
|
||||
BYTE _bUnknown2[2];
|
||||
BYTE bTouchPacketsN; // 0x00 to 0x03 (USB max)
|
||||
DS4_TOUCH sCurrentTouch;
|
||||
DS4_TOUCH sPreviousTouch[2];
|
||||
} Report;
|
||||
|
||||
UCHAR ReportBuffer[63];
|
||||
};
|
||||
} DS4_REPORT_EX, *PDS4_REPORT_EX;
|
||||
|
||||
#include <poppack.h>
|
||||
@@ -1,50 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ViGEm/Common.h"
|
||||
#include <limits.h>
|
||||
|
||||
VOID FORCEINLINE XUSB_TO_DS4_REPORT(
|
||||
_Out_ PXUSB_REPORT Input,
|
||||
_Out_ PDS4_REPORT Output
|
||||
)
|
||||
{
|
||||
if (Input->wButtons & XUSB_GAMEPAD_BACK) Output->wButtons |= DS4_BUTTON_SHARE;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_START) Output->wButtons |= DS4_BUTTON_OPTIONS;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_LEFT_THUMB) Output->wButtons |= DS4_BUTTON_THUMB_LEFT;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_RIGHT_THUMB) Output->wButtons |= DS4_BUTTON_THUMB_RIGHT;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_LEFT_SHOULDER) Output->wButtons |= DS4_BUTTON_SHOULDER_LEFT;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_RIGHT_SHOULDER) Output->wButtons |= DS4_BUTTON_SHOULDER_RIGHT;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_GUIDE) Output->bSpecial |= DS4_SPECIAL_BUTTON_PS;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_A) Output->wButtons |= DS4_BUTTON_CROSS;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_B) Output->wButtons |= DS4_BUTTON_CIRCLE;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_X) Output->wButtons |= DS4_BUTTON_SQUARE;
|
||||
if (Input->wButtons & XUSB_GAMEPAD_Y) Output->wButtons |= DS4_BUTTON_TRIANGLE;
|
||||
|
||||
Output->bTriggerL = Input->bLeftTrigger;
|
||||
Output->bTriggerR = Input->bRightTrigger;
|
||||
|
||||
if (Input->bLeftTrigger > 0)Output->wButtons |= DS4_BUTTON_TRIGGER_LEFT;
|
||||
if (Input->bRightTrigger > 0)Output->wButtons |= DS4_BUTTON_TRIGGER_RIGHT;
|
||||
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_UP) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_NORTH);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_RIGHT) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_EAST);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_DOWN) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_SOUTH);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_LEFT) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_WEST);
|
||||
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_UP
|
||||
&& Input->wButtons & XUSB_GAMEPAD_DPAD_RIGHT) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_NORTHEAST);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_RIGHT
|
||||
&& Input->wButtons & XUSB_GAMEPAD_DPAD_DOWN) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_SOUTHEAST);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_DOWN
|
||||
&& Input->wButtons & XUSB_GAMEPAD_DPAD_LEFT) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_SOUTHWEST);
|
||||
if (Input->wButtons & XUSB_GAMEPAD_DPAD_LEFT
|
||||
&& Input->wButtons & XUSB_GAMEPAD_DPAD_UP) DS4_SET_DPAD(Output, DS4_BUTTON_DPAD_NORTHWEST);
|
||||
|
||||
Output->bThumbLX = ((Input->sThumbLX + ((USHRT_MAX / 2) + 1)) / 257);
|
||||
Output->bThumbLY = (-(Input->sThumbLY + ((USHRT_MAX / 2) - 1)) / 257);
|
||||
Output->bThumbLY = (Output->bThumbLY == 0) ? 0xFF : Output->bThumbLY;
|
||||
Output->bThumbRX = ((Input->sThumbRX + ((USHRT_MAX / 2) + 1)) / 257);
|
||||
Output->bThumbRY = (-(Input->sThumbRY + ((USHRT_MAX / 2) + 1)) / 257);
|
||||
Output->bThumbRY = (Output->bThumbRY == 0) ? 0xFF : Output->bThumbRY;
|
||||
}
|
||||
|
||||
@@ -1,467 +0,0 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016-2019 Nefarius Software Solutions e.U. and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
//
|
||||
// GUID identifying the bus device. Used by client library to detect and communicate.
|
||||
//
|
||||
// IMPORTANT: make sure to change this value if you fork it or introduce
|
||||
// breaking changes!
|
||||
//
|
||||
// {96E42B22-F5E9-42F8-B043-ED0F932F014F}
|
||||
DEFINE_GUID(GUID_DEVINTERFACE_BUSENUM_VIGEM,
|
||||
0x96E42B22, 0xF5E9, 0x42F8, 0xB0, 0x43, 0xED, 0x0F, 0x93, 0x2F, 0x01, 0x4F);
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ViGEm/Common.h"
|
||||
|
||||
//
|
||||
// Common version for user-mode library and driver compatibility
|
||||
//
|
||||
// On initialization, the user-mode library has this number embedded
|
||||
// and sends it to the bus on its enumeration. The bus compares this
|
||||
// number to the one it was compiled with. If they match, the bus
|
||||
// access is permitted and success reported. If they mismatch, an
|
||||
// error is reported and the user-mode library skips this instance.
|
||||
//
|
||||
#define VIGEM_COMMON_VERSION 0x0001
|
||||
|
||||
#define FILE_DEVICE_BUSENUM FILE_DEVICE_BUS_EXTENDER
|
||||
#define BUSENUM_IOCTL(_index_) CTL_CODE(FILE_DEVICE_BUSENUM, _index_, METHOD_BUFFERED, FILE_READ_DATA)
|
||||
#define BUSENUM_W_IOCTL(_index_) CTL_CODE(FILE_DEVICE_BUSENUM, _index_, METHOD_BUFFERED, FILE_WRITE_DATA)
|
||||
#define BUSENUM_R_IOCTL(_index_) CTL_CODE(FILE_DEVICE_BUSENUM, _index_, METHOD_BUFFERED, FILE_READ_DATA)
|
||||
#define BUSENUM_RW_IOCTL(_index_) CTL_CODE(FILE_DEVICE_BUSENUM, _index_, METHOD_BUFFERED, FILE_WRITE_DATA | FILE_READ_DATA)
|
||||
|
||||
#define IOCTL_VIGEM_BASE 0x801
|
||||
|
||||
//
|
||||
// IO control codes
|
||||
//
|
||||
#define IOCTL_VIGEM_PLUGIN_TARGET BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x000)
|
||||
#define IOCTL_VIGEM_UNPLUG_TARGET BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x001)
|
||||
#define IOCTL_VIGEM_CHECK_VERSION BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x002)
|
||||
#define IOCTL_VIGEM_WAIT_DEVICE_READY BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x003)
|
||||
|
||||
#define IOCTL_XUSB_REQUEST_NOTIFICATION BUSENUM_RW_IOCTL(IOCTL_VIGEM_BASE + 0x200)
|
||||
#define IOCTL_XUSB_SUBMIT_REPORT BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x201)
|
||||
#define IOCTL_DS4_SUBMIT_REPORT BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x202)
|
||||
#define IOCTL_DS4_REQUEST_NOTIFICATION BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x203)
|
||||
//#define IOCTL_XGIP_SUBMIT_REPORT BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x204)
|
||||
//#define IOCTL_XGIP_SUBMIT_INTERRUPT BUSENUM_W_IOCTL (IOCTL_VIGEM_BASE + 0x205)
|
||||
#define IOCTL_XUSB_GET_USER_INDEX BUSENUM_RW_IOCTL(IOCTL_VIGEM_BASE + 0x206)
|
||||
|
||||
|
||||
//
|
||||
// Data structure used in PlugIn and UnPlug ioctls
|
||||
//
|
||||
|
||||
#pragma region Plugin
|
||||
|
||||
//
|
||||
// Data structure used in IOCTL_VIGEM_PLUGIN_TARGET requests.
|
||||
//
|
||||
typedef struct _VIGEM_PLUGIN_TARGET
|
||||
{
|
||||
//
|
||||
// sizeof (struct _BUSENUM_HARDWARE)
|
||||
//
|
||||
IN ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
IN ULONG SerialNo;
|
||||
|
||||
//
|
||||
// Type of the target device to emulate.
|
||||
//
|
||||
VIGEM_TARGET_TYPE TargetType;
|
||||
|
||||
//
|
||||
// If set, the vendor ID the emulated device is reporting
|
||||
//
|
||||
USHORT VendorId;
|
||||
|
||||
//
|
||||
// If set, the product ID the emulated device is reporting
|
||||
//
|
||||
USHORT ProductId;
|
||||
|
||||
} VIGEM_PLUGIN_TARGET, *PVIGEM_PLUGIN_TARGET;
|
||||
|
||||
//
|
||||
// Initializes a VIGEM_PLUGIN_TARGET structure.
|
||||
//
|
||||
VOID FORCEINLINE VIGEM_PLUGIN_TARGET_INIT(
|
||||
_Out_ PVIGEM_PLUGIN_TARGET PlugIn,
|
||||
_In_ ULONG SerialNo,
|
||||
_In_ VIGEM_TARGET_TYPE TargetType
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(PlugIn, sizeof(VIGEM_PLUGIN_TARGET));
|
||||
|
||||
PlugIn->Size = sizeof(VIGEM_PLUGIN_TARGET);
|
||||
PlugIn->SerialNo = SerialNo;
|
||||
PlugIn->TargetType = TargetType;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Unplug
|
||||
|
||||
//
|
||||
// Data structure used in IOCTL_VIGEM_UNPLUG_TARGET requests.
|
||||
//
|
||||
typedef struct _VIGEM_UNPLUG_TARGET
|
||||
{
|
||||
//
|
||||
// sizeof (struct _REMOVE_HARDWARE)
|
||||
//
|
||||
IN ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
} VIGEM_UNPLUG_TARGET, *PVIGEM_UNPLUG_TARGET;
|
||||
|
||||
//
|
||||
// Initializes a VIGEM_UNPLUG_TARGET structure.
|
||||
//
|
||||
VOID FORCEINLINE VIGEM_UNPLUG_TARGET_INIT(
|
||||
_Out_ PVIGEM_UNPLUG_TARGET UnPlug,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(UnPlug, sizeof(VIGEM_UNPLUG_TARGET));
|
||||
|
||||
UnPlug->Size = sizeof(VIGEM_UNPLUG_TARGET);
|
||||
UnPlug->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Check version
|
||||
|
||||
typedef struct _VIGEM_CHECK_VERSION
|
||||
{
|
||||
IN ULONG Size;
|
||||
|
||||
IN ULONG Version;
|
||||
|
||||
} VIGEM_CHECK_VERSION, *PVIGEM_CHECK_VERSION;
|
||||
|
||||
VOID FORCEINLINE VIGEM_CHECK_VERSION_INIT(
|
||||
_Out_ PVIGEM_CHECK_VERSION CheckVersion,
|
||||
_In_ ULONG Version
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(CheckVersion, sizeof(VIGEM_CHECK_VERSION));
|
||||
|
||||
CheckVersion->Size = sizeof(VIGEM_CHECK_VERSION);
|
||||
CheckVersion->Version = Version;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Wait device ready
|
||||
|
||||
typedef struct _VIGEM_WAIT_DEVICE_READY
|
||||
{
|
||||
IN ULONG Size;
|
||||
|
||||
IN ULONG SerialNo;
|
||||
|
||||
} VIGEM_WAIT_DEVICE_READY, * PVIGEM_WAIT_DEVICE_READY;
|
||||
|
||||
VOID FORCEINLINE VIGEM_WAIT_DEVICE_READY_INIT(
|
||||
_Out_ PVIGEM_WAIT_DEVICE_READY WaitReady,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(WaitReady, sizeof(VIGEM_WAIT_DEVICE_READY));
|
||||
|
||||
WaitReady->Size = sizeof(VIGEM_WAIT_DEVICE_READY);
|
||||
WaitReady->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region XUSB (aka Xbox 360 device) section
|
||||
|
||||
//
|
||||
// Data structure used in IOCTL_XUSB_REQUEST_NOTIFICATION requests.
|
||||
//
|
||||
typedef struct _XUSB_REQUEST_NOTIFICATION
|
||||
{
|
||||
//
|
||||
// sizeof(struct _XUSB_REQUEST_NOTIFICATION)
|
||||
//
|
||||
ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
//
|
||||
// Vibration intensity value of the large motor (0-255).
|
||||
//
|
||||
UCHAR LargeMotor;
|
||||
|
||||
//
|
||||
// Vibration intensity value of the small motor (0-255).
|
||||
//
|
||||
UCHAR SmallMotor;
|
||||
|
||||
//
|
||||
// Index number of the slot/LED that XUSB.sys has assigned.
|
||||
//
|
||||
UCHAR LedNumber;
|
||||
|
||||
} XUSB_REQUEST_NOTIFICATION, *PXUSB_REQUEST_NOTIFICATION;
|
||||
|
||||
//
|
||||
// Initializes a XUSB_REQUEST_NOTIFICATION structure.
|
||||
//
|
||||
VOID FORCEINLINE XUSB_REQUEST_NOTIFICATION_INIT(
|
||||
_Out_ PXUSB_REQUEST_NOTIFICATION Request,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Request, sizeof(XUSB_REQUEST_NOTIFICATION));
|
||||
|
||||
Request->Size = sizeof(XUSB_REQUEST_NOTIFICATION);
|
||||
Request->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
//
|
||||
// Data structure used in IOCTL_XUSB_SUBMIT_REPORT requests.
|
||||
//
|
||||
typedef struct _XUSB_SUBMIT_REPORT
|
||||
{
|
||||
//
|
||||
// sizeof(struct _XUSB_SUBMIT_REPORT)
|
||||
//
|
||||
ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
//
|
||||
// Report to submit to the target device.
|
||||
//
|
||||
XUSB_REPORT Report;
|
||||
|
||||
} XUSB_SUBMIT_REPORT, *PXUSB_SUBMIT_REPORT;
|
||||
|
||||
//
|
||||
// Initializes an XUSB report.
|
||||
//
|
||||
VOID FORCEINLINE XUSB_SUBMIT_REPORT_INIT(
|
||||
_Out_ PXUSB_SUBMIT_REPORT Report,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Report, sizeof(XUSB_SUBMIT_REPORT));
|
||||
|
||||
Report->Size = sizeof(XUSB_SUBMIT_REPORT);
|
||||
Report->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
typedef struct _XUSB_GET_USER_INDEX
|
||||
{
|
||||
//
|
||||
// sizeof(struct _XUSB_GET_USER_INDEX)
|
||||
//
|
||||
ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
//
|
||||
// User index of target device.
|
||||
//
|
||||
OUT ULONG UserIndex;
|
||||
|
||||
} XUSB_GET_USER_INDEX, *PXUSB_GET_USER_INDEX;
|
||||
|
||||
//
|
||||
// Initializes XUSB_GET_USER_INDEX structure.
|
||||
//
|
||||
VOID FORCEINLINE XUSB_GET_USER_INDEX_INIT(
|
||||
_Out_ PXUSB_GET_USER_INDEX GetRequest,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(GetRequest, sizeof(XUSB_GET_USER_INDEX));
|
||||
|
||||
GetRequest->Size = sizeof(XUSB_GET_USER_INDEX);
|
||||
GetRequest->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region DualShock 4 section
|
||||
|
||||
typedef struct _DS4_OUTPUT_REPORT
|
||||
{
|
||||
//
|
||||
// Vibration intensity value of the small motor (0-255).
|
||||
//
|
||||
UCHAR SmallMotor;
|
||||
|
||||
//
|
||||
// Vibration intensity value of the large motor (0-255).
|
||||
//
|
||||
UCHAR LargeMotor;
|
||||
|
||||
//
|
||||
// Color values of the Lightbar.
|
||||
//
|
||||
DS4_LIGHTBAR_COLOR LightbarColor;
|
||||
|
||||
} DS4_OUTPUT_REPORT, *PDS4_OUTPUT_REPORT;
|
||||
|
||||
//
|
||||
// Data structure used in IOCTL_DS4_REQUEST_NOTIFICATION requests.
|
||||
//
|
||||
typedef struct _DS4_REQUEST_NOTIFICATION
|
||||
{
|
||||
//
|
||||
// sizeof(struct _XUSB_REQUEST_NOTIFICATION)
|
||||
//
|
||||
ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
//
|
||||
// The HID output report
|
||||
//
|
||||
DS4_OUTPUT_REPORT Report;
|
||||
|
||||
} DS4_REQUEST_NOTIFICATION, *PDS4_REQUEST_NOTIFICATION;
|
||||
|
||||
//
|
||||
// Initializes a DS4_REQUEST_NOTIFICATION structure.
|
||||
//
|
||||
VOID FORCEINLINE DS4_REQUEST_NOTIFICATION_INIT(
|
||||
_Out_ PDS4_REQUEST_NOTIFICATION Request,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Request, sizeof(DS4_REQUEST_NOTIFICATION));
|
||||
|
||||
Request->Size = sizeof(DS4_REQUEST_NOTIFICATION);
|
||||
Request->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
//
|
||||
// DualShock 4 request data
|
||||
//
|
||||
typedef struct _DS4_SUBMIT_REPORT
|
||||
{
|
||||
//
|
||||
// sizeof(struct _DS4_SUBMIT_REPORT)
|
||||
//
|
||||
ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
ULONG SerialNo;
|
||||
|
||||
//
|
||||
// HID Input report
|
||||
//
|
||||
DS4_REPORT Report;
|
||||
|
||||
} DS4_SUBMIT_REPORT, *PDS4_SUBMIT_REPORT;
|
||||
|
||||
//
|
||||
// Initializes a DualShock 4 report.
|
||||
//
|
||||
VOID FORCEINLINE DS4_SUBMIT_REPORT_INIT(
|
||||
_Out_ PDS4_SUBMIT_REPORT Report,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Report, sizeof(DS4_SUBMIT_REPORT));
|
||||
|
||||
Report->Size = sizeof(DS4_SUBMIT_REPORT);
|
||||
Report->SerialNo = SerialNo;
|
||||
|
||||
DS4_REPORT_INIT(&Report->Report);
|
||||
}
|
||||
|
||||
#include <pshpack1.h>
|
||||
|
||||
//
|
||||
// DualShock 4 extended report request
|
||||
//
|
||||
typedef struct _DS4_SUBMIT_REPORT_EX
|
||||
{
|
||||
//
|
||||
// sizeof(struct _DS4_SUBMIT_REPORT_EX)
|
||||
//
|
||||
_In_ ULONG Size;
|
||||
|
||||
//
|
||||
// Serial number of target device.
|
||||
//
|
||||
_In_ ULONG SerialNo;
|
||||
|
||||
//
|
||||
// Full size HID report excluding fixed Report ID.
|
||||
//
|
||||
_In_ DS4_REPORT_EX Report;
|
||||
|
||||
} DS4_SUBMIT_REPORT_EX, * PDS4_SUBMIT_REPORT_EX;
|
||||
|
||||
#include <poppack.h>
|
||||
|
||||
//
|
||||
// Initializes a DualShock 4 extended report.
|
||||
//
|
||||
VOID FORCEINLINE DS4_SUBMIT_REPORT_EX_INIT(
|
||||
_Out_ PDS4_SUBMIT_REPORT_EX Report,
|
||||
_In_ ULONG SerialNo
|
||||
)
|
||||
{
|
||||
RtlZeroMemory(Report, sizeof(DS4_SUBMIT_REPORT_EX));
|
||||
|
||||
Report->Size = sizeof(DS4_SUBMIT_REPORT_EX);
|
||||
Report->SerialNo = SerialNo;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
@@ -1,71 +0,0 @@
|
||||
/*
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2017-2019 Nefarius Software Solutions e.U. and Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
*/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
//
|
||||
// TODO: this is... not optimal. Improve in the future.
|
||||
//
|
||||
#define VIGEM_TARGETS_MAX USHRT_MAX
|
||||
|
||||
|
||||
//
|
||||
// Represents a driver connection object.
|
||||
//
|
||||
typedef struct _VIGEM_CLIENT_T
|
||||
{
|
||||
HANDLE hBusDevice;
|
||||
|
||||
} VIGEM_CLIENT;
|
||||
|
||||
//
|
||||
// Represents the (connection) state of a target device object.
|
||||
//
|
||||
typedef enum _VIGEM_TARGET_STATE
|
||||
{
|
||||
VIGEM_TARGET_NEW,
|
||||
VIGEM_TARGET_INITIALIZED,
|
||||
VIGEM_TARGET_CONNECTED,
|
||||
VIGEM_TARGET_DISCONNECTED
|
||||
} VIGEM_TARGET_STATE, *PVIGEM_TARGET_STATE;
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Represents a virtual gamepad object.
|
||||
//
|
||||
typedef struct _VIGEM_TARGET_T
|
||||
{
|
||||
ULONG Size;
|
||||
ULONG SerialNo;
|
||||
VIGEM_TARGET_STATE State;
|
||||
USHORT VendorId;
|
||||
USHORT ProductId;
|
||||
VIGEM_TARGET_TYPE Type;
|
||||
FARPROC Notification;
|
||||
LPVOID NotificationUserData;
|
||||
|
||||
HANDLE cancelNotificationThreadEvent;
|
||||
} VIGEM_TARGET;
|
||||
@@ -1,8 +0,0 @@
|
||||
# ViGEm user-mode client library
|
||||
This static library provides the gateway to the bus drivers functionalities. It offers:
|
||||
* Searching and connecting to a library-compatible bus device on the system
|
||||
* Attaching and removing a (artificially limited) number of virtual devices
|
||||
* Feeding the emulated devices (aka providing input state changes)
|
||||
|
||||
## Dependencies
|
||||
In addition to this library you'll need to link against `setupapi.lib`.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,110 +0,0 @@
|
||||
// Microsoft Visual C++ generated resource script.
|
||||
//
|
||||
#include "resource.h"
|
||||
|
||||
#define APSTUDIO_READONLY_SYMBOLS
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 2 resource.
|
||||
//
|
||||
#include "winres.h"
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#undef APSTUDIO_READONLY_SYMBOLS
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United States) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
|
||||
#pragma code_page(1252)
|
||||
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// TEXTINCLUDE
|
||||
//
|
||||
|
||||
1 TEXTINCLUDE
|
||||
BEGIN
|
||||
"resource.h\0"
|
||||
END
|
||||
|
||||
2 TEXTINCLUDE
|
||||
BEGIN
|
||||
"#include ""winres.h""\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
3 TEXTINCLUDE
|
||||
BEGIN
|
||||
"\r\n"
|
||||
"\0"
|
||||
END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
#endif // English (United States) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// English (United Kingdom) resources
|
||||
|
||||
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENG)
|
||||
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
|
||||
#pragma code_page(1252)
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION 1,0,0,1
|
||||
PRODUCTVERSION 1,0,0,1
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "080904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Nefarius Software Solutions e.U."
|
||||
VALUE "FileDescription", "Virtual Gamepad Emulation Framework User-Mode Library"
|
||||
VALUE "FileVersion", "1.0.0.1"
|
||||
VALUE "InternalName", "ViGEmClient.dll"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2017-2020 Nefarius Software Solutions e.U."
|
||||
VALUE "OriginalFilename", "ViGEmClient.dll"
|
||||
VALUE "ProductName", "Virtual Gamepad Emulation Framework User-Mode Library"
|
||||
VALUE "ProductVersion", "1.0.0.1"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x809, 1200
|
||||
END
|
||||
END
|
||||
|
||||
#endif // English (United Kingdom) resources
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
#ifndef APSTUDIO_INVOKED
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Generated from the TEXTINCLUDE 3 resource.
|
||||
//
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
#endif // not APSTUDIO_INVOKED
|
||||
|
||||
@@ -1,450 +0,0 @@
|
||||
<?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>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug_DLL|x64">
|
||||
<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>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_DLL|x64">
|
||||
<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>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Debug_LIB|x64">
|
||||
<Configuration>Debug_LIB</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Release_LIB|x64">
|
||||
<Configuration>Release_LIB</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{7DB06674-1F4F-464B-8E1C-172E9587F9DC}</ProjectGuid>
|
||||
<Keyword>Win32Proj</Keyword>
|
||||
<RootNamespace>ViGEmClient</RootNamespace>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'==''">
|
||||
<!-- Latest Target Version property -->
|
||||
<LatestTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</LatestTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)' == ''">10.0</WindowsTargetPlatformVersion>
|
||||
<TargetPlatformVersion>$(WindowsTargetPlatformVersion)</TargetPlatformVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|Win32'" Label="Configuration">
|
||||
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
<CharacterSet>Unicode</CharacterSet>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|x64'" Label="Configuration">
|
||||
<ConfigurationType>StaticLibrary</ConfigurationType>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
<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>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<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>
|
||||
<PlatformToolset>v142</PlatformToolset>
|
||||
<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>
|
||||
<ImportGroup Label="Shared">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|Win32'">
|
||||
<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|Win32'" 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|Win32'">
|
||||
<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|Win32'" 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)'=='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>
|
||||
<OutDir>$(SolutionDir)lib\debug\$(PlatformShortName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|Win32'">
|
||||
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\debug\$(PlatformShortName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'">
|
||||
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<OutDir>$(SolutionDir)lib\release\$(PlatformShortName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|Win32'">
|
||||
<IncludePath>$(ProjectDir)../include;$(VC_IncludePath);$(WindowsSDK_IncludePath);</IncludePath>
|
||||
<OutDir>$(SolutionDir)bin\release\$(PlatformShortName)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|x64'">
|
||||
<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>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
</Link>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|Win32'">
|
||||
<ClCompile>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;VIGEM_DYNAMIC;VIGEM_EXPORTS;WIN32;_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)'=='Debug_LIB|x64'">
|
||||
<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_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>
|
||||
</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)'=='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>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<SDLCheck>true</SDLCheck>
|
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
||||
<OptimizeReferences>true</OptimizeReferences>
|
||||
</Link>
|
||||
<Lib>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
</Lib>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|Win32'">
|
||||
<ClCompile>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<PrecompiledHeader>
|
||||
</PrecompiledHeader>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32_LEAN_AND_MEAN;VIGEM_DYNAMIC;VIGEM_EXPORTS;WIN32;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>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|x64'">
|
||||
<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_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>
|
||||
<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>
|
||||
<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" />
|
||||
<ClInclude Include="..\include\ViGEm\Util.h" />
|
||||
<ClInclude Include="..\include\ViGEm\km\BusShared.h" />
|
||||
<ClInclude Include="Internal.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ViGEmClient.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ViGEmClient.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
||||
@@ -1,53 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\ViGEm">
|
||||
<UniqueIdentifier>{3355fb06-3745-4161-8c61-b8bca15ff8fa}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Header Files\ViGEm\km">
|
||||
<UniqueIdentifier>{e0df94ae-e213-4f04-981d-02d6d321df28}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="Internal.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\ViGEm\km\BusShared.h">
|
||||
<Filter>Header Files\ViGEm\km</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\ViGEm\Client.h">
|
||||
<Filter>Header Files\ViGEm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\ViGEm\Common.h">
|
||||
<Filter>Header Files\ViGEm</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\include\ViGEm\Util.h">
|
||||
<Filter>Header Files\ViGEm</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="ViGEmClient.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="ViGEmClient.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,14 +0,0 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by ViGEmClient.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
@@ -1,155 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
|
||||
<!-- https://stackoverflow.com/a/18630847 -->
|
||||
<?if $(var.Platform) = x64 ?>
|
||||
<?define Win64 = "yes" ?>
|
||||
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
|
||||
<?define ArchDir = "x64" ?>
|
||||
<?define WixQuietExec="WixQuietExec64"?>
|
||||
<?else ?>
|
||||
<?define Win64 = "no" ?>
|
||||
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
|
||||
<?define ArchDir = "x86" ?>
|
||||
<?define WixQuietExec="WixQuietExec"?>
|
||||
<?endif ?>
|
||||
|
||||
<!-- change build flow if running under CI -->
|
||||
<?ifdef env.APPVEYOR?>
|
||||
<?define IsCI = "yes" ?>
|
||||
<?else ?>
|
||||
<?define IsCI = "no" ?>
|
||||
<?endif ?>
|
||||
|
||||
<!-- use driver file version for installer -->
|
||||
<?define VERSION = "!(bind.FileVersion.ViGEmBus.sys)" ?>
|
||||
|
||||
<!-- basic product properties -->
|
||||
<Product Id="*" Name="Nefarius Virtual Gamepad Emulation Bus Driver" Language="1033" Version="$(var.VERSION)"
|
||||
Manufacturer="Nefarius Software Solutions e.U."
|
||||
UpgradeCode="0A4A02DE-0BE3-4BF4-91F0-1EA47AD26881">
|
||||
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" />
|
||||
|
||||
<!-- use single MSI file only -->
|
||||
<MediaTemplate EmbedCab="yes" />
|
||||
|
||||
<!-- set setup icon and uninstall options -->
|
||||
<Icon Id="ViGEm.ico" SourceFile="ViGEm.ico" />
|
||||
<Property Id="ARPPRODUCTICON" Value="ViGEm.ico" />
|
||||
<Property Id="ARPURLINFOABOUT" Value="https://github.com/ViGEm/ViGEmBus" />
|
||||
<Property Id="ARPNOREPAIR" Value="yes" Secure="yes" />
|
||||
|
||||
<!-- always perform major upgrade and remove previous versions -->
|
||||
<Property Id="PREVIOUSVERSIONSINSTALLED" Secure="yes" />
|
||||
<Upgrade Id="0A4A02DE-0BE3-4BF4-91F0-1EA47AD26881">
|
||||
<UpgradeVersion
|
||||
Minimum="1.0.0.0" Maximum="$(var.VERSION)"
|
||||
Property="PREVIOUSVERSIONSINSTALLED"
|
||||
IncludeMinimum="yes" IncludeMaximum="no" />
|
||||
</Upgrade>
|
||||
|
||||
<!-- don't allow downgrades -->
|
||||
<MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
||||
|
||||
<!-- https://stackoverflow.com/a/31991006 -->
|
||||
<Property Id="WIN10FOUND">
|
||||
<DirectorySearch Id="searchSystem" Path="[SystemFolder]" Depth="0">
|
||||
<FileSearch Id="searchFile" Name="advapi32.dll" MinVersion="6.3.10000.0"/>
|
||||
</DirectorySearch>
|
||||
</Property>
|
||||
|
||||
<!-- https://stackoverflow.com/a/23061358 -->
|
||||
<Condition Message="This application can only be installed on Windows 10.">
|
||||
<![CDATA[Installed OR WIN10FOUND]]>
|
||||
</Condition>
|
||||
|
||||
<!-- write version value to registry -->
|
||||
<DirectoryRef Id="TARGETDIR">
|
||||
<Component Id="RegistryEntries" Guid="85C87E47-E2C7-4684-A3FB-6F7853A86B41">
|
||||
<RegistryKey Root="HKLM"
|
||||
Key="SOFTWARE\Nefarius Software Solutions e.U.\ViGEm Bus Driver">
|
||||
<RegistryValue Type="string" Name="Version" Value="$(var.VERSION)" KeyPath="yes"/>
|
||||
</RegistryKey>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- main feature are the driver files and some version registry values -->
|
||||
<Feature Id="ProductFeature" Title="Nefarius Virtual Gamepad Emulation Bus Driver" Level="1">
|
||||
<ComponentGroupRef Id="ProductComponents" />
|
||||
<ComponentRef Id="RegistryEntries" />
|
||||
</Feature>
|
||||
|
||||
<!-- build installation command -->
|
||||
<CustomAction Id="DevconInstallPropertyAssign"
|
||||
Property="DevconInstallQuiet"
|
||||
Value=""[INSTALLFOLDER]devcon.exe" install "[INSTALLFOLDER]ViGEmBus.inf" Nefarius\ViGEmBus\Gen1"
|
||||
Execute="immediate" />
|
||||
|
||||
<!-- execute installation with suppressed UI -->
|
||||
<CustomAction Id="DevconInstallQuiet" BinaryKey="WixCA" DllEntry="$(var.WixQuietExec)"
|
||||
Execute="deferred" Return="check" Impersonate="no" />
|
||||
|
||||
<!-- build removal command -->
|
||||
<CustomAction Id="DevconRemovePropertyAssign"
|
||||
Property="DevconRemoveQuiet"
|
||||
Value=""[INSTALLFOLDER]devcon.exe" /r remove "Nefarius\ViGEmBus\Gen1""
|
||||
Execute="immediate" />
|
||||
|
||||
<!-- execute removal with suppressed UI -->
|
||||
<CustomAction Id="DevconRemoveQuiet" BinaryKey="WixCA" DllEntry="$(var.WixQuietExec)"
|
||||
Execute="deferred" Return="ignore" Impersonate="no" />
|
||||
|
||||
<!-- custom installation and removal actions -->
|
||||
<InstallExecuteSequence>
|
||||
<Custom Action="DevconInstallPropertyAssign" Before="DevconInstallQuiet">NOT Installed AND NOT REMOVE</Custom>
|
||||
<Custom Action="DevconRemovePropertyAssign" Before="DevconRemoveQuiet">REMOVE="ALL"</Custom>
|
||||
<Custom Action="DevconInstallQuiet" Before="InstallFinalize">NOT Installed AND NOT REMOVE</Custom>
|
||||
<Custom Action='DevconRemoveQuiet' After='InstallInitialize'>REMOVE="ALL"</Custom>
|
||||
</InstallExecuteSequence>
|
||||
|
||||
<!-- use LICENSE as EULA, not technically an EULA but for now it has to do -->
|
||||
<WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)LICENSE.rtf" />
|
||||
|
||||
<!-- use minimalistic UI with EULA approval -->
|
||||
<UIRef Id="WixUI_Minimal" />
|
||||
|
||||
</Product>
|
||||
|
||||
<!-- build program files directory -->
|
||||
<Fragment>
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<Directory Id="$(var.PlatformProgramFilesFolder)">
|
||||
<!-- the "e.U." is butchered so omitted -->
|
||||
<Directory Id="NSS" Name="Nefarius Software Solutions">
|
||||
<Directory Id="INSTALLFOLDER" Name="Virtual Gamepad Emulation Bus Driver" />
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Directory>
|
||||
</Fragment>
|
||||
|
||||
<!-- include necessary files -->
|
||||
<Fragment>
|
||||
<ComponentGroup Id="ProductComponents" Directory="INSTALLFOLDER">
|
||||
<Component Id="ProductComponent" Guid="9DB08B36-09FC-48F5-8BDA-2EE24687B5DF" Win64="$(var.Win64)">
|
||||
<?if $(var.IsCI) = "no" ?>
|
||||
<!-- local build -->
|
||||
<File Name="ViGEmBus.sys" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.sys" />
|
||||
<File Name="ViGEmBus.inf" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.inf" />
|
||||
<File Name="ViGEmBus.cat" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\ViGEmBus.cat" />
|
||||
<File Name="devcon.exe" Source="$(var.SolutionDir)\drivers\$(var.ArchDir)\devcon.exe" />
|
||||
<File Name="devcon-LICENSE" Source="$(var.SolutionDir)\drivers\devcon-LICENSE" />
|
||||
<File Name="LICENSE" Source="$(var.SolutionDir)\LICENSE" />
|
||||
<?else ?>
|
||||
<!-- CI build -->
|
||||
<File Name="ViGEmBus.sys" Source="$(var.SolutionDir)bin\$(var.ArchDir)\ViGEmBus\ViGEmBus.sys" />
|
||||
<File Name="ViGEmBus.inf" Source="$(var.SolutionDir)bin\$(var.ArchDir)\ViGEmBus\ViGEmBus.inf" />
|
||||
<File Name="ViGEmBus.cat" Source="$(var.SolutionDir)bin\$(var.ArchDir)\ViGEmBus\ViGEmBus.cat" />
|
||||
<File Name="devcon.exe" Source="$(var.SolutionDir)drivers\$(var.ArchDir)\devcon.exe" />
|
||||
<File Name="devcon-LICENSE" Source="$(var.SolutionDir)drivers\devcon-LICENSE" />
|
||||
<File Name="LICENSE" Source="$(var.SolutionDir)LICENSE" />
|
||||
<?endif ?>
|
||||
</Component>
|
||||
</ComponentGroup>
|
||||
</Fragment>
|
||||
</Wix>
|
||||
@@ -1,13 +1,11 @@
|
||||
<?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}">
|
||||
<DOCUMENT Type="Advanced Installer" CreateVersion="19.5" version="20.6" 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"/>
|
||||
<ROW Name="HiddenItems" Value="ActSyncAppComponent;CPLAppletComponent;AutorunComponent;GameUxComponent;SilverlightSlnComponent;SharePointSlnComponent;AppXAppDetailsComponent;FixupComponent;AppXCapabilitiesComponent;AppXDependenciesComponent;AppXProductDetailsComponent;AppXVisualAssetsComponent;AppXAppDeclarationsComponent;AppXUriRulesComponent;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/"/>
|
||||
@@ -19,66 +17,83 @@
|
||||
<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="ProductCode" Value="2057:{9C581C76-2D68-40F8-AA6F-94D3C5215C05} " 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="ProductVersion" Value="1.21.442"/>
|
||||
<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="WindowsTypeNT" MultiBuildValue="DefaultBuild:Windows Vista x86, Windows Server 2008 x86, Windows 7 x86, Windows 8 x86, Windows 8.1 x86" 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="-"/>
|
||||
<ROW Property="WindowsTypeNT64" MultiBuildValue="DefaultBuild:Windows Vista x64, Windows Server 2008 x64, Windows 7 x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 8.1 x64, Windows Server 2012 R2 x64, Windows Server x64" ValueLocId="-"/>
|
||||
<ROW Property="WindowsTypeNT64Display" MultiBuildValue="DefaultBuild:Windows Vista x64, Windows Server 2008 x64, Windows 7 x64, Windows Server 2008 R2 x64, Windows 8 x64, Windows Server 2012 x64, Windows 8.1 x64, Windows Server 2012 R2 x64, Windows Server x64" ValueLocId="-"/>
|
||||
<ROW Property="WindowsTypeNTDisplay" MultiBuildValue="DefaultBuild:Windows Vista x86, Windows Server 2008 x86, Windows 7 x86, Windows 8 x86, Windows 8.1 x86" 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="ARM64_Dir" Directory_Parent="APPDIR" DefaultDir="ARM64"/>
|
||||
<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="LICENSE" ComponentId="{60476948-DBD4-4515-B1B1-6EECCB99AE99}" Directory_="ARM64_Dir" Attributes="0" KeyPath="LICENSE_2" Type="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="ViGEmBus.inf" ComponentId="{E79736E3-4F2D-4E11-9BED-7A17521333E7}" Directory_="ARM64_Dir" Attributes="0" Condition="AiArm64" KeyPath="ViGEmBus.inf_2"/>
|
||||
<ROW Component="ViGEmBus.pdb" ComponentId="{965D6CDE-0142-4A0F-90B8-12D3322333BF}" Directory_="APPDIR" Attributes="0" KeyPath="ViGEmBus.pdb" Type="4"/>
|
||||
<ROW Component="ViGEmBus.pdb_2" ComponentId="{58BB969A-1902-4F8A-AFCF-F4950E272E7C}" Directory_="ARM64_Dir" Attributes="0" KeyPath="ViGEmBus.pdb_2" Type="4"/>
|
||||
<ROW Component="ViGEmBus.pdb_3" ComponentId="{EFCC2160-8010-43A3-B5A8-7C09A83C208B}" Directory_="AI_Bin32_Dir" Attributes="0" KeyPath="ViGEmBus.pdb_3" Type="4"/>
|
||||
<ROW Component="ViGEmBus.sys" ComponentId="{DA974243-DAFB-49CF-8693-FF51C234CBD5}" Directory_="APPDIR" Attributes="256" Condition="VersionNT64 AND NOT AiArm64" KeyPath="ViGEmBus.sys" Type="0"/>
|
||||
<ROW Component="nefconw.exe" ComponentId="{AEADABD6-0FA7-4BF5-A3F5-1043F5D911F9}" Directory_="APPDIR" Attributes="256" Condition="VersionNT64 AND NOT AiArm64" KeyPath="nefconw.exe"/>
|
||||
<ROW Component="nefconw.exe_1" ComponentId="{E0BCC5D1-4762-490A-AD7E-9A36C8DF724C}" Directory_="AI_Bin32_Dir" Attributes="0" Condition="NOT VersionNT64 AND NOT AiArm64" KeyPath="nefconw.exe_1"/>
|
||||
<ROW Component="nefconw.exe_2" ComponentId="{B25A0000-3F39-43D0-95F8-4B804DAB3DE5}" Directory_="ARM64_Dir" Attributes="256" Condition="AiArm64" KeyPath="nefconw.exe_2"/>
|
||||
<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"/>
|
||||
<ROW Component="vigembus.cat" ComponentId="{CEA011F4-933A-459C-B951-B1BC17E4E671}" Directory_="AI_Bin32_Dir" Attributes="0" Condition="NOT VersionNT64 AND NOT AiArm64" KeyPath="vigembus.cat_1" Type="0"/>
|
||||
<ROW Component="vigembus.cat_1" ComponentId="{300845F0-6D4A-4954-A8BC-93B4345FCD3E}" Directory_="ARM64_Dir" Attributes="0" Condition="AiArm64" KeyPath="ViGEmBus.sys_2" Type="0"/>
|
||||
<ROW Component="vigembus.cat_2" ComponentId="{E0F5FE8D-4431-42DE-B766-8E05D53D2672}" Directory_="ARM64_Dir" Attributes="0" Condition="AiArm64" KeyPath="vigembus.cat_2"/>
|
||||
</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="ARM64" Title="ARM64" Description="ARM64" Display="7" 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"/>
|
||||
<ATTRIBUTE name="CurrentFeature" value="ARM64"/>
|
||||
</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="<AI_STUBS>updater.exe" SelfReg="false" DigSign="true"/>
|
||||
<ROW File="nefconw.exe_2" Component_="nefconw.exe_2" FileName="nefconw.exe" Attributes="0" SourcePath="..\drivers\arm64\nefconw.exe" SelfReg="false"/>
|
||||
<ROW File="vigembus.cat_2" Component_="vigembus.cat_2" FileName="vigembus.cat" Attributes="0" SourcePath="..\drivers\arm64\vigembus.cat" SelfReg="false"/>
|
||||
<ROW File="ViGEmBus.inf_2" Component_="ViGEmBus.inf" FileName="ViGEmBus.inf" Attributes="0" SourcePath="..\drivers\arm64\ViGEmBus.inf" SelfReg="false"/>
|
||||
<ROW File="ViGEmBus.sys_2" Component_="vigembus.cat_1" FileName="ViGEmBus.sys" Attributes="0" SourcePath="..\drivers\arm64\ViGEmBus.sys" SelfReg="false"/>
|
||||
<ROW File="LICENSE_2" Component_="LICENSE" FileName="LICENSE" Attributes="0" SourcePath="..\drivers\arm64\LICENSE" SelfReg="false"/>
|
||||
<ROW File="ViGEmBus.pdb_2" Component_="ViGEmBus.pdb_2" FileName="ViGEmBus.pdb" Attributes="0" SourcePath="..\artifacts\bin\arm64\ViGEmBus.pdb" SelfReg="false"/>
|
||||
<ROW File="ViGEmBus.pdb_3" Component_="ViGEmBus.pdb_3" FileName="ViGEmBus.pdb" Attributes="0" SourcePath="..\artifacts\bin\x86\ViGEmBus.pdb" SelfReg="false"/>
|
||||
<ROW File="ViGEmBus.pdb" Component_="ViGEmBus.pdb" FileName="ViGEmBus.pdb" Attributes="0" SourcePath="..\artifacts\bin\x64\ViGEmBus.pdb" SelfReg="false"/>
|
||||
</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"/>
|
||||
<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="[CommonAppDataFolder]Nefarius Software Solutions\[|ProductName] [|ProductVersion]\install" ExtUI="true" UseLargeSchema="true" ExeName="ViGEmBus_[|ProductVersion]_x64_x86_arm64" MsiPackageType="AI_ALL"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.DictionaryComponent">
|
||||
<ROW Path="<AI_DICTS>ui.ail"/>
|
||||
@@ -126,8 +141,9 @@
|
||||
<ROW Name="lzmaextractor.dll" SourcePath="<AI_CUSTACTS>lzmaextractor.dll"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiConditionComponent">
|
||||
<ROW Feature_="AI64BitFiles" Level="0" Condition="NOT VersionNT64"/>
|
||||
<ROW Feature_="AI32BitFiles" Level="0" Condition="VersionNT64"/>
|
||||
<ROW Feature_="AI64BitFiles" Level="0" Condition="NOT VersionNT64 OR AiArm64"/>
|
||||
<ROW Feature_="AI32BitFiles" Level="0" Condition="VersionNT64 OR AiArm64"/>
|
||||
<ROW Feature_="ARM64" Level="0" Condition="NOT AiArm64"/>
|
||||
</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"/>
|
||||
@@ -179,6 +195,7 @@
|
||||
<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_PRESERVE_INSTALL_TYPE" Type="65" Source="aicustact.dll" Target="PreserveInstallType"/>
|
||||
<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]"/>
|
||||
@@ -197,6 +214,10 @@
|
||||
<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="arm64_AddDeviceNode" Type="1106" Source="nefconw.exe_2" Target="--create-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-name System --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
|
||||
<ROW Action="arm64_InstallDriver" Type="1106" Source="nefconw.exe_2" Target="--install-driver --inf-path "[#ViGEmBus.inf_2]""/>
|
||||
<ROW Action="arm64_UninstallDevice" Type="1106" Source="nefconw.exe_2" Target="--remove-device-node --hardware-id Nefarius\ViGEmBus\Gen1 --class-guid 4D36E97D-E325-11CE-BFC1-08002BE10318"/>
|
||||
<ROW Action="arm64_UninstallDriver" Type="1106" Source="nefconw.exe_2" Target="--uninstall-driver --inf-path "[#ViGEmBus.inf]""/>
|
||||
<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 "[#ViGEmBus.inf]""/>
|
||||
<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"/>
|
||||
@@ -214,11 +235,17 @@
|
||||
<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"/>
|
||||
<ROW Feature_="ARM64" Component_="nefconw.exe_2"/>
|
||||
<ROW Feature_="ARM64" Component_="vigembus.cat_2"/>
|
||||
<ROW Feature_="ARM64" Component_="ViGEmBus.inf"/>
|
||||
<ROW Feature_="ARM64" Component_="vigembus.cat_1"/>
|
||||
<ROW Feature_="ARM64" Component_="LICENSE"/>
|
||||
<ROW Feature_="ARM64" Component_="ViGEmBus.pdb_2"/>
|
||||
<ROW Feature_="AI32BitFiles" Component_="ViGEmBus.pdb_3"/>
|
||||
<ROW Feature_="AI64BitFiles" Component_="ViGEmBus.pdb"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiIconsComponent">
|
||||
<ROW Name="ViGEm.exe" SourcePath="ViGEm.ico" Index="0"/>
|
||||
@@ -238,7 +265,7 @@
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstExSeqComponent">
|
||||
<ROW Action="AI_DOWNGRADE" Condition="AI_NEWERPRODUCTFOUND AND (UILevel <> 5)" Sequence="210"/>
|
||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="747"/>
|
||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1508"/>
|
||||
<ROW Action="AI_STORE_LOCATION" Condition="(Not Installed) OR REINSTALL" Sequence="1510"/>
|
||||
<ROW Action="AI_PREPARE_UPGRADE" Condition="AI_UPGRADE="No" AND (Not Installed)" Sequence="1397"/>
|
||||
<ROW Action="AI_ResolveKnownFolders" Sequence="52"/>
|
||||
<ROW Action="AI_EnableDebugLog" Sequence="51"/>
|
||||
@@ -261,16 +288,20 @@
|
||||
<ROW Action="AI_ProcessTasks2" Condition="(VersionNT >= 600) AND (REMOVE<>"ALL")" Sequence="1624"/>
|
||||
<ROW Action="AI_UninstallTasks2" Condition="(VersionNT >= 600) AND (REMOVE="ALL")" Sequence="1699"/>
|
||||
<ROW Action="ForceReboot" Condition="AI_UPGRADE<>"No" AND OLDPRODUCTS AND AFTERREBOOT<>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 = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 )" Sequence="1502"/>
|
||||
<ROW Action="x64_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 )" Sequence="1504"/>
|
||||
<ROW Action="x64_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 )" Sequence="1506"/>
|
||||
<ROW Action="x86_UninstallDevice_Old" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( NOT VersionNT64 )" Sequence="1503"/>
|
||||
<ROW Action="x86_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( NOT VersionNT64 )" Sequence="1505"/>
|
||||
<ROW Action="x86_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) 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"/>
|
||||
<ROW Action="x64_AddDeviceNode" Condition="( NOT Installed ) AND ( VersionNT64 AND NOT AiArm64 )" Sequence="6401"/>
|
||||
<ROW Action="x64_InstallDriver" Condition="( NOT Installed ) AND ( VersionNT64 AND NOT AiArm64 )" Sequence="6404"/>
|
||||
<ROW Action="x64_UninstallDevice_Old" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 AND NOT AiArm64 )" Sequence="1502"/>
|
||||
<ROW Action="x64_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 AND NOT AiArm64 )" Sequence="1504"/>
|
||||
<ROW Action="x64_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( VersionNT64 AND NOT AiArm64 )" Sequence="1507"/>
|
||||
<ROW Action="x86_UninstallDevice_Old" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( NOT VersionNT64 AND NOT AiArm64 )" Sequence="1503"/>
|
||||
<ROW Action="x86_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( NOT VersionNT64 AND NOT AiArm64 )" Sequence="1505"/>
|
||||
<ROW Action="x86_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( NOT VersionNT64 AND NOT AiArm64 )" Sequence="1508"/>
|
||||
<ROW Action="x86_AddDeviceNode" Condition="( NOT Installed ) AND ( NOT VersionNT64 AND NOT AiArm64 )" Sequence="6402"/>
|
||||
<ROW Action="x86_InstallDriver" Condition="( NOT Installed ) AND ( NOT VersionNT64 AND NOT AiArm64 )" Sequence="6405"/>
|
||||
<ROW Action="arm64_AddDeviceNode" Condition="( NOT Installed ) AND ( AiArm64 )" Sequence="6403"/>
|
||||
<ROW Action="arm64_InstallDriver" Condition="( NOT Installed ) AND ( AiArm64 )" Sequence="6406"/>
|
||||
<ROW Action="arm64_UninstallDevice" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( AiArm64 )" Sequence="1506"/>
|
||||
<ROW Action="arm64_UninstallDriver" Condition="( ( NOT Installed ) OR ( Installed AND ( REMOVE = "ALL" OR AI_INSTALL_MODE = "Remove" ) ) ) AND ( AiArm64 )" Sequence="1509"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiInstallUISequenceComponent">
|
||||
<ROW Action="AI_RESTORE_LOCATION" Condition="APPDIR=""" Sequence="747"/>
|
||||
@@ -281,8 +312,11 @@
|
||||
<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"/>
|
||||
<ROW Action="AI_PRESERVE_INSTALL_TYPE" Sequence="199"/>
|
||||
</COMPONENT>
|
||||
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
|
||||
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 <> 600) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 600) OR (MsiNTProductType = 1)) AND ((VersionNT64 <> 601) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 601) OR (MsiNTProductType = 1)) AND ((VersionNT64 <> 602) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 602) OR (MsiNTProductType = 1)) AND ((VersionNT64 <> 603) OR (MsiNTProductType <> 1)) AND ((VersionNT64 <> 603) OR (MsiNTProductType = 1)) AND ((VersionNT64 <> 1000) OR (MsiNTProductType = 1)) ) )" Description="[ProductName] can not be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild"/>
|
||||
<ROW Condition="( Version9X OR VersionNT64 OR ( VersionNT AND ((VersionNT <> 600) OR (MsiNTProductType <> 1)) AND ((VersionNT <> 600) OR (MsiNTProductType = 1)) AND (VersionNT <> 601) AND (VersionNT <> 602) AND (VersionNT <> 603) ) )" Description="[ProductName] can not be installed on the following Windows versions: [WindowsTypeNTDisplay]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT" IsPredefined="true" Builds="DefaultBuild"/>
|
||||
<ROW Condition="((VersionNT <> 501) AND (VersionNT <> 502))" Description="[ProductName] cannot be installed on [WindowsTypeNT5XDisplay]." DescriptionLocId="AI.LaunchCondition.NoNT5X" IsPredefined="true" Builds="DefaultBuild"/>
|
||||
<ROW Condition="(VersionNT <> 400)" Description="[ProductName] can not be installed on [WindowsTypeNT40Display]." DescriptionLocId="AI.LaunchCondition.NoNT40" IsPredefined="true" Builds="DefaultBuild"/>
|
||||
<ROW Condition="(VersionNT <> 500)" Description="[ProductName] can not be installed on [WindowsTypeNT50Display]." DescriptionLocId="AI.LaunchCondition.NoNT50" IsPredefined="true" Builds="DefaultBuild"/>
|
||||
@@ -315,7 +349,7 @@
|
||||
<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"/>
|
||||
<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||20480|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]"/>
|
||||
|
||||
@@ -1,70 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" InitialTargets="EnsureWixToolsetInstalled" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
|
||||
<ProductVersion>3.10</ProductVersion>
|
||||
<ProjectGuid>c722b85e-fc7d-475f-a518-c8e13ecdb201</ProjectGuid>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<OutputName>ViGEmBusSetup_$(Platform)</OutputName>
|
||||
<OutputType>Package</OutputType>
|
||||
<!-- https://stackoverflow.com/a/18630847 -->
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
|
||||
<OutputPath>$(SolutionDir)bin\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
|
||||
<DefineConstants>Debug</DefineConstants>
|
||||
<OutputPath>bin\$(Platform)\$(Configuration)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
|
||||
<OutputPath>$(SolutionDir)bin\$(Platform)\</OutputPath>
|
||||
<IntermediateOutputPath>obj\$(Platform)\$(Configuration)\</IntermediateOutputPath>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Product.wxs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="ViGEm.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<WixExtension Include="WixUIExtension">
|
||||
<HintPath>$(WixExtDir)\WixUIExtension.dll</HintPath>
|
||||
<Name>WixUIExtension</Name>
|
||||
</WixExtension>
|
||||
<WixExtension Include="WixUtilExtension">
|
||||
<HintPath>$(WixExtDir)\WixUtilExtension.dll</HintPath>
|
||||
<Name>WixUtilExtension</Name>
|
||||
</WixExtension>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\sys\ViGEmBus.vcxproj">
|
||||
<Name>ViGEmBus</Name>
|
||||
<Project>{040101b0-ee5c-4ef1-99ee-9f81c795c001}</Project>
|
||||
<Private>True</Private>
|
||||
<DoNotHarvest>True</DoNotHarvest>
|
||||
<RefProjectOutputGroups>Binaries;Content;Satellites</RefProjectOutputGroups>
|
||||
<RefTargetDir>INSTALLFOLDER</RefTargetDir>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
|
||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets" Condition=" '$(WixTargetsPath)' == '' AND Exists('$(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets') " />
|
||||
<Target Name="EnsureWixToolsetInstalled" Condition=" '$(WixTargetsImported)' != 'true' ">
|
||||
<Error Text="The WiX Toolset v3.11 (or newer) build tools must be installed to build this project. To download the WiX Toolset, see http://wixtoolset.org/releases/" />
|
||||
</Target>
|
||||
<!--
|
||||
To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Wix.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
@@ -110,6 +110,9 @@ Get-AppVeyorArtifacts -Account "nefarius" -Project "ViGemBus" -Path $Path -Token
|
||||
# Download x86 binaries
|
||||
Get-AppVeyorArtifacts -Account "nefarius" -Project "ViGemBus" -Path $Path -Token $Token -Branch $BuildVersion -JobName "Platform: x86"
|
||||
|
||||
# Download ARM64 binaries
|
||||
Get-AppVeyorArtifacts -Account "nefarius" -Project "ViGemBus" -Path $Path -Token $Token -Branch $BuildVersion -JobName "Platform: ARM64"
|
||||
|
||||
# List of files to sign
|
||||
$files = "`".\artifacts\disk1\*.cab`" "
|
||||
|
||||
@@ -121,3 +124,4 @@ if ($NoSigning -eq $false) {
|
||||
# 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")"
|
||||
"ViGemBus ARM64 v$BuildVersion $(Get-Date -Format "dd.MM.yyyy")"
|
||||
|
||||
325
sys/Driver.cpp
325
sys/Driver.cpp
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -59,6 +59,20 @@ using ViGEm::Bus::Targets::EmulationTargetDS4;
|
||||
|
||||
EXTERN_C_START
|
||||
|
||||
IoctlHandler_IoctlRecord ViGEmBus_IoctlSpecification[] =
|
||||
{
|
||||
{IOCTL_VIGEM_CHECK_VERSION, sizeof(VIGEM_CHECK_VERSION), 0, Bus_CheckVersionHandler},
|
||||
{IOCTL_VIGEM_WAIT_DEVICE_READY, sizeof(VIGEM_WAIT_DEVICE_READY), 0, Bus_WaitDeviceReadyHandler},
|
||||
{IOCTL_VIGEM_PLUGIN_TARGET, sizeof(VIGEM_PLUGIN_TARGET), 0, Bus_PluginTargetHandler},
|
||||
{IOCTL_VIGEM_UNPLUG_TARGET, sizeof(VIGEM_UNPLUG_TARGET), 0, Bus_UnplugTargetHandler},
|
||||
{IOCTL_XUSB_SUBMIT_REPORT, sizeof(XUSB_SUBMIT_REPORT), 0, Bus_XusbSubmitReportHandler},
|
||||
{IOCTL_XUSB_REQUEST_NOTIFICATION, sizeof(XUSB_REQUEST_NOTIFICATION), sizeof(XUSB_REQUEST_NOTIFICATION), Bus_XusbRequestNotificationHandler},
|
||||
{IOCTL_DS4_SUBMIT_REPORT, sizeof(DS4_SUBMIT_REPORT), 0, Bus_Ds4SubmitReportHandler},
|
||||
{IOCTL_DS4_REQUEST_NOTIFICATION, sizeof(DS4_REQUEST_NOTIFICATION), sizeof(DS4_REQUEST_NOTIFICATION), Bus_Ds4RequestNotificationHandler},
|
||||
{IOCTL_XUSB_GET_USER_INDEX, sizeof(XUSB_GET_USER_INDEX), sizeof(XUSB_GET_USER_INDEX), Bus_XusbGetUserIndexHandler},
|
||||
{IOCTL_DS4_AWAIT_OUTPUT_AVAILABLE, sizeof(DS4_AWAIT_OUTPUT), sizeof(DS4_AWAIT_OUTPUT), Bus_Ds4AwaitOutputHandler},
|
||||
};
|
||||
|
||||
//
|
||||
// Driver entry routine.
|
||||
//
|
||||
@@ -107,23 +121,22 @@ NTSTATUS DriverEntry(IN PDRIVER_OBJECT DriverObject, IN PUNICODE_STRING Registry
|
||||
//
|
||||
NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
|
||||
{
|
||||
WDF_CHILD_LIST_CONFIG config;
|
||||
NTSTATUS status;
|
||||
WDFDEVICE device;
|
||||
WDF_IO_QUEUE_CONFIG queueConfig;
|
||||
PNP_BUS_INFORMATION busInfo;
|
||||
WDFQUEUE queue;
|
||||
WDF_FILEOBJECT_CONFIG foConfig;
|
||||
WDF_OBJECT_ATTRIBUTES fdoAttributes;
|
||||
WDF_OBJECT_ATTRIBUTES fileHandleAttributes;
|
||||
PFDO_DEVICE_DATA pFDOData;
|
||||
PWSTR pSymbolicNameList;
|
||||
WDF_CHILD_LIST_CONFIG config;
|
||||
NTSTATUS status;
|
||||
WDFDEVICE device = NULL;
|
||||
PNP_BUS_INFORMATION busInfo;
|
||||
WDF_FILEOBJECT_CONFIG foConfig;
|
||||
WDF_OBJECT_ATTRIBUTES fdoAttributes;
|
||||
WDF_OBJECT_ATTRIBUTES fileHandleAttributes;
|
||||
PFDO_DEVICE_DATA pFDOData;
|
||||
PWSTR pSymbolicNameList;
|
||||
PDMFDEVICE_INIT dmfDeviceInit = NULL;
|
||||
|
||||
UNREFERENCED_PARAMETER(Driver);
|
||||
|
||||
PAGED_CODE();
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "%!FUNC! Entry");
|
||||
FuncEntry(TRACE_DRIVER);
|
||||
|
||||
#pragma region Check for duplicated FDO
|
||||
|
||||
@@ -132,13 +145,12 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
|
||||
// and use of named device object. Food for thought for future.
|
||||
//
|
||||
|
||||
status = IoGetDeviceInterfaces(
|
||||
if (NT_SUCCESS(status = IoGetDeviceInterfaces(
|
||||
&GUID_DEVINTERFACE_BUSENUM_VIGEM,
|
||||
NULL,
|
||||
0, // Important!
|
||||
&pSymbolicNameList
|
||||
);
|
||||
if (NT_SUCCESS(status))
|
||||
)))
|
||||
{
|
||||
const bool deviceAlreadyExists = (0 != *pSymbolicNameList);
|
||||
ExFreePool(pSymbolicNameList);
|
||||
@@ -165,112 +177,188 @@ NTSTATUS Bus_EvtDeviceAdd(IN WDFDRIVER Driver, IN PWDFDEVICE_INIT DeviceInit)
|
||||
|
||||
#pragma endregion
|
||||
|
||||
WdfDeviceInitSetDeviceType(DeviceInit, FILE_DEVICE_BUS_EXTENDER);
|
||||
// More than one process may talk to the bus at the same time
|
||||
WdfDeviceInitSetExclusive(DeviceInit, FALSE);
|
||||
// Bus is power policy owner over all PDOs
|
||||
WdfDeviceInitSetPowerPolicyOwnership(DeviceInit, TRUE);
|
||||
do
|
||||
{
|
||||
dmfDeviceInit = DMF_DmfDeviceInitAllocate(DeviceInit);
|
||||
|
||||
if (dmfDeviceInit == NULL)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"DMF_DmfDeviceInitAllocate failed"
|
||||
);
|
||||
|
||||
status = STATUS_INSUFFICIENT_RESOURCES;
|
||||
break;
|
||||
}
|
||||
|
||||
DMF_DmfDeviceInitHookPnpPowerEventCallbacks(dmfDeviceInit, NULL);
|
||||
DMF_DmfDeviceInitHookPowerPolicyEventCallbacks(dmfDeviceInit, NULL);
|
||||
|
||||
WdfDeviceInitSetDeviceType(DeviceInit, FILE_DEVICE_BUS_EXTENDER);
|
||||
|
||||
#pragma region Prepare child list
|
||||
|
||||
WDF_CHILD_LIST_CONFIG_INIT(&config, sizeof(PDO_IDENTIFICATION_DESCRIPTION), Bus_EvtDeviceListCreatePdo);
|
||||
WDF_CHILD_LIST_CONFIG_INIT(&config, sizeof(PDO_IDENTIFICATION_DESCRIPTION), Bus_EvtDeviceListCreatePdo);
|
||||
|
||||
config.EvtChildListIdentificationDescriptionCompare = EmulationTargetPDO::EvtChildListIdentificationDescriptionCompare;
|
||||
config.EvtChildListIdentificationDescriptionCompare = EmulationTargetPDO::EvtChildListIdentificationDescriptionCompare;
|
||||
|
||||
WdfFdoInitSetDefaultChildListConfig(DeviceInit, &config, WDF_NO_OBJECT_ATTRIBUTES);
|
||||
WdfFdoInitSetDefaultChildListConfig(DeviceInit, &config, WDF_NO_OBJECT_ATTRIBUTES);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Assign File Object Configuration
|
||||
|
||||
WDF_FILEOBJECT_CONFIG_INIT(&foConfig, Bus_DeviceFileCreate, Bus_FileClose, NULL);
|
||||
WDF_FILEOBJECT_CONFIG_INIT(&foConfig, Bus_DeviceFileCreate, Bus_FileClose, NULL);
|
||||
|
||||
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&fileHandleAttributes, FDO_FILE_DATA);
|
||||
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&fileHandleAttributes, FDO_FILE_DATA);
|
||||
|
||||
WdfDeviceInitSetFileObjectConfig(DeviceInit, &foConfig, &fileHandleAttributes);
|
||||
DMF_DmfDeviceInitHookFileObjectConfig(dmfDeviceInit, &foConfig);
|
||||
|
||||
WdfDeviceInitSetFileObjectConfig(DeviceInit, &foConfig, &fileHandleAttributes);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Create FDO
|
||||
|
||||
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&fdoAttributes, FDO_DEVICE_DATA);
|
||||
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&fdoAttributes, FDO_DEVICE_DATA);
|
||||
|
||||
status = WdfDeviceCreate(&DeviceInit, &fdoAttributes, &device);
|
||||
if (!NT_SUCCESS(status = WdfDeviceCreate(
|
||||
&DeviceInit,
|
||||
&fdoAttributes,
|
||||
&device
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"WdfDeviceCreate failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"WdfDeviceCreate failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
pFDOData = FdoGetData(device);
|
||||
|
||||
pFDOData = FdoGetData(device);
|
||||
if (pFDOData == NULL)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"FdoGetData failed");
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
||||
pFDOData->InterfaceReferenceCounter = 0;
|
||||
pFDOData->NextSessionId = FDO_FIRST_SESSION_ID;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Create default I/O queue for FDO
|
||||
|
||||
WDF_IO_QUEUE_CONFIG_INIT_DEFAULT_QUEUE(&queueConfig, WdfIoQueueDispatchParallel);
|
||||
|
||||
queueConfig.EvtIoDeviceControl = Bus_EvtIoDeviceControl;
|
||||
|
||||
__analysis_assume(queueConfig.EvtIoStop != 0);
|
||||
status = WdfIoQueueCreate(device, &queueConfig, WDF_NO_OBJECT_ATTRIBUTES, &queue);
|
||||
__analysis_assume(queueConfig.EvtIoStop == 0);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"WdfIoQueueCreate failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
pFDOData->InterfaceReferenceCounter = 0;
|
||||
pFDOData->NextSessionId = FDO_FIRST_SESSION_ID;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Expose FDO interface
|
||||
|
||||
status = WdfDeviceCreateDeviceInterface(device, &GUID_DEVINTERFACE_BUSENUM_VIGEM, NULL);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"WdfDeviceCreateDeviceInterface failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
if (!NT_SUCCESS(status = WdfDeviceCreateDeviceInterface(
|
||||
device,
|
||||
&GUID_DEVINTERFACE_BUSENUM_VIGEM,
|
||||
NULL
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DRIVER,
|
||||
"WdfDeviceCreateDeviceInterface failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Set bus information
|
||||
|
||||
busInfo.BusTypeGuid = GUID_BUS_TYPE_USB;
|
||||
busInfo.LegacyBusType = PNPBus;
|
||||
busInfo.BusNumber = 0;
|
||||
busInfo.BusTypeGuid = GUID_BUS_TYPE_USB;
|
||||
busInfo.LegacyBusType = PNPBus;
|
||||
busInfo.BusNumber = 0;
|
||||
|
||||
WdfDeviceSetBusInformationForChildren(device, &busInfo);
|
||||
WdfDeviceSetBusInformationForChildren(device, &busInfo);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_DRIVER, "%!FUNC! Exit with status %!STATUS!", status);
|
||||
//
|
||||
// DMF Module initialization
|
||||
//
|
||||
DMF_EVENT_CALLBACKS dmfEventCallbacks;
|
||||
DMF_EVENT_CALLBACKS_INIT(&dmfEventCallbacks);
|
||||
dmfEventCallbacks.EvtDmfDeviceModulesAdd = DmfDeviceModulesAdd;
|
||||
DMF_DmfDeviceInitSetEventCallbacks(
|
||||
dmfDeviceInit,
|
||||
&dmfEventCallbacks
|
||||
);
|
||||
|
||||
status = DMF_ModulesCreate(device, &dmfDeviceInit);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceEvents(
|
||||
TRACE_LEVEL_ERROR,
|
||||
TRACE_DRIVER,
|
||||
"DMF_ModulesCreate failed with status %!STATUS!",
|
||||
status
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
} while (FALSE);
|
||||
|
||||
if (dmfDeviceInit != NULL)
|
||||
{
|
||||
DMF_DmfDeviceInitFree(&dmfDeviceInit);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(status) && device != NULL)
|
||||
{
|
||||
WdfObjectDelete(device);
|
||||
}
|
||||
|
||||
FuncExit(TRACE_DRIVER, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
#pragma code_seg("PAGED")
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
VOID
|
||||
DmfDeviceModulesAdd(
|
||||
_In_ WDFDEVICE Device,
|
||||
_In_ PDMFMODULE_INIT DmfModuleInit
|
||||
)
|
||||
{
|
||||
FuncEntry(TRACE_DRIVER);
|
||||
|
||||
PFDO_DEVICE_DATA pDevCtx = FdoGetData(Device);
|
||||
|
||||
DMF_MODULE_ATTRIBUTES moduleAttributes;
|
||||
DMF_CONFIG_IoctlHandler ioctlHandlerConfig;
|
||||
DMF_CONFIG_IoctlHandler_AND_ATTRIBUTES_INIT(&ioctlHandlerConfig, &moduleAttributes);
|
||||
|
||||
ioctlHandlerConfig.DeviceInterfaceGuid = GUID_DEVINTERFACE_BUSENUM_VIGEM;
|
||||
ioctlHandlerConfig.IoctlRecordCount = ARRAYSIZE(ViGEmBus_IoctlSpecification);
|
||||
ioctlHandlerConfig.IoctlRecords = ViGEmBus_IoctlSpecification;
|
||||
ioctlHandlerConfig.ForwardUnhandledRequests = FALSE;
|
||||
|
||||
DMF_DmfModuleAdd(
|
||||
DmfModuleInit,
|
||||
&moduleAttributes,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
NULL
|
||||
);
|
||||
|
||||
DMF_CONFIG_NotifyUserWithRequestMultiple notifyConfig;
|
||||
DMF_CONFIG_NotifyUserWithRequestMultiple_AND_ATTRIBUTES_INIT(¬ifyConfig, &moduleAttributes);
|
||||
|
||||
notifyConfig.MaximumNumberOfPendingRequests = 64 * 2;
|
||||
notifyConfig.SizeOfDataBuffer = sizeof(DS4_AWAIT_OUTPUT);
|
||||
notifyConfig.MaximumNumberOfPendingDataBuffers = 64;
|
||||
notifyConfig.ModeType.Modes.ReplayLastMessageToNewClients = FALSE;
|
||||
notifyConfig.CompletionCallback = Bus_EvtUserNotifyRequestComplete;
|
||||
|
||||
DMF_DmfModuleAdd(
|
||||
DmfModuleInit,
|
||||
&moduleAttributes,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&pDevCtx->UserNotification
|
||||
);
|
||||
|
||||
FuncExitNoReturn(TRACE_DRIVER);
|
||||
}
|
||||
#pragma code_seg()
|
||||
|
||||
// Gets called when the user-land process (or kernel driver) exits or closes the handle,
|
||||
// and all IO has completed.
|
||||
//
|
||||
@@ -475,4 +563,73 @@ Return Value:
|
||||
|
||||
}
|
||||
|
||||
void Bus_EvtUserNotifyRequestComplete(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_opt_ ULONG_PTR Context,
|
||||
_In_ NTSTATUS NtStatus
|
||||
)
|
||||
{
|
||||
FuncEntry(TRACE_DRIVER);
|
||||
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
|
||||
auto pOutput = reinterpret_cast<PDS4_AWAIT_OUTPUT>(Context);
|
||||
PDS4_AWAIT_OUTPUT pNotify = NULL;
|
||||
size_t length = 0;
|
||||
|
||||
if (NT_SUCCESS(WdfRequestRetrieveOutputBuffer(
|
||||
Request,
|
||||
sizeof(DS4_AWAIT_OUTPUT),
|
||||
reinterpret_cast<PVOID*>(&pNotify),
|
||||
&length)))
|
||||
{
|
||||
RtlCopyMemory(pNotify, pOutput, sizeof(DS4_AWAIT_OUTPUT));
|
||||
|
||||
Util_DumpAsHex("NOTIFY_COMPLETE", pNotify, sizeof(DS4_AWAIT_OUTPUT));
|
||||
|
||||
WdfRequestSetInformation(Request, sizeof(DS4_AWAIT_OUTPUT));
|
||||
}
|
||||
|
||||
WdfRequestComplete(Request, NtStatus);
|
||||
|
||||
FuncExit(TRACE_DRIVER, "status=%!STATUS!", NtStatus);
|
||||
}
|
||||
|
||||
void Util_DumpAsHex(PCSTR Prefix, PVOID Buffer, ULONG BufferLength)
|
||||
{
|
||||
#ifdef DBG
|
||||
|
||||
size_t dumpBufferLength = ((BufferLength * sizeof(CHAR)) * 2) + 1;
|
||||
PSTR dumpBuffer = static_cast<PSTR>(ExAllocatePoolZero(
|
||||
NonPagedPoolNx,
|
||||
dumpBufferLength,
|
||||
'1234'
|
||||
));
|
||||
if (dumpBuffer)
|
||||
{
|
||||
|
||||
RtlZeroMemory(dumpBuffer, dumpBufferLength);
|
||||
|
||||
for (ULONG i = 0; i < BufferLength; i++)
|
||||
{
|
||||
sprintf(&dumpBuffer[i * 2], "%02X", static_cast<PUCHAR>(Buffer)[i]);
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_BUSPDO,
|
||||
"%s - Buffer length: %04d, buffer content: %s\n",
|
||||
Prefix,
|
||||
BufferLength,
|
||||
dumpBuffer
|
||||
);
|
||||
|
||||
ExFreePoolWithTag(dumpBuffer, '1234');
|
||||
}
|
||||
#else
|
||||
UNREFERENCED_PARAMETER(Prefix);
|
||||
UNREFERENCED_PARAMETER(Buffer);
|
||||
UNREFERENCED_PARAMETER(BufferLength);
|
||||
#endif
|
||||
}
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
26
sys/Driver.h
26
sys/Driver.h
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -65,6 +65,11 @@ typedef struct _FDO_DEVICE_DATA
|
||||
//
|
||||
LONG NextSessionId;
|
||||
|
||||
//
|
||||
// Notification DMF module
|
||||
//
|
||||
DMFMODULE UserNotification;
|
||||
|
||||
} FDO_DEVICE_DATA, * PFDO_DEVICE_DATA;
|
||||
|
||||
#define FDO_FIRST_SESSION_ID 100
|
||||
@@ -77,7 +82,8 @@ WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(FDO_DEVICE_DATA, FdoGetData)
|
||||
typedef struct _FDO_FILE_DATA
|
||||
{
|
||||
//
|
||||
// SessionId associated with file handle. Used to map file handles to emulated gamepad devices
|
||||
// SessionId associated with file handle.
|
||||
// Used to map file handles to emulated gamepad devices.
|
||||
//
|
||||
LONG SessionId;
|
||||
|
||||
@@ -104,6 +110,22 @@ EVT_WDF_OBJECT_CONTEXT_CLEANUP Bus_EvtDriverContextCleanup;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
_IRQL_requires_max_(PASSIVE_LEVEL)
|
||||
VOID
|
||||
DmfDeviceModulesAdd(
|
||||
_In_ WDFDEVICE Device,
|
||||
_In_ PDMFMODULE_INIT DmfModuleInit
|
||||
);
|
||||
|
||||
void Bus_EvtUserNotifyRequestComplete(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_opt_ ULONG_PTR Context,
|
||||
_In_ NTSTATUS NtStatus
|
||||
);
|
||||
|
||||
void Util_DumpAsHex(PCSTR Prefix, PVOID Buffer, ULONG BufferLength);
|
||||
|
||||
#pragma region Bus enumeration-specific functions
|
||||
|
||||
NTSTATUS
|
||||
|
||||
339
sys/Ds4Pdo.cpp
339
sys/Ds4Pdo.cpp
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -192,162 +192,160 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::PdoInitContext()
|
||||
// PDO is parent
|
||||
timerAttribs.ParentObject = this->_PdoDevice;
|
||||
|
||||
// Create timer
|
||||
status = WdfTimerCreate(
|
||||
&timerConfig,
|
||||
&timerAttribs,
|
||||
&this->_PendingUsbInRequestsTimer
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
do
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfTimerCreate failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
// Load/generate MAC address
|
||||
|
||||
//
|
||||
// TODO: tidy up this region
|
||||
//
|
||||
|
||||
WDFKEY keyParams, keyTargets, keyDS, keySerial;
|
||||
UNICODE_STRING keyName, valueName;
|
||||
|
||||
status = WdfDriverOpenParametersRegistryKey(
|
||||
WdfGetDriver(),
|
||||
STANDARD_RIGHTS_ALL,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyParams
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfDriverOpenParametersRegistryKey failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&keyName, L"Targets");
|
||||
|
||||
status = WdfRegistryCreateKey(
|
||||
keyParams,
|
||||
&keyName,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyTargets
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&keyName, L"DualShock");
|
||||
|
||||
status = WdfRegistryCreateKey(
|
||||
keyTargets,
|
||||
&keyName,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyDS
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
DECLARE_UNICODE_STRING_SIZE(serialPath, 4);
|
||||
RtlUnicodeStringPrintf(&serialPath, L"%04d", this->_SerialNo);
|
||||
|
||||
status = WdfRegistryCreateKey(
|
||||
keyDS,
|
||||
&serialPath,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keySerial
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&valueName, L"TargetMacAddress");
|
||||
|
||||
status = WdfRegistryQueryValue(
|
||||
keySerial,
|
||||
&valueName,
|
||||
sizeof(MAC_ADDRESS),
|
||||
&this->_TargetMacAddress,
|
||||
nullptr,
|
||||
nullptr
|
||||
);
|
||||
|
||||
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);
|
||||
|
||||
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
GenerateRandomMacAddress(&this->_TargetMacAddress);
|
||||
|
||||
status = WdfRegistryAssignValue(
|
||||
keySerial,
|
||||
&valueName,
|
||||
REG_BINARY,
|
||||
sizeof(MAC_ADDRESS),
|
||||
static_cast<PVOID>(&this->_TargetMacAddress)
|
||||
);
|
||||
if (!NT_SUCCESS(status))
|
||||
// Create timer
|
||||
if (!NT_SUCCESS(status = WdfTimerCreate(
|
||||
&timerConfig,
|
||||
&timerAttribs,
|
||||
&this->_PendingUsbInRequestsTimer
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryAssignValue failed with status %!STATUS!",
|
||||
"WdfTimerCreate failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
|
||||
// Load/generate MAC address
|
||||
|
||||
//
|
||||
// TODO: tidy up this region
|
||||
//
|
||||
|
||||
WDFKEY keyParams, keyTargets, keyDS, keySerial;
|
||||
UNICODE_STRING keyName, valueName;
|
||||
|
||||
if (!NT_SUCCESS(status = WdfDriverOpenParametersRegistryKey(
|
||||
WdfGetDriver(),
|
||||
STANDARD_RIGHTS_ALL,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyParams
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfDriverOpenParametersRegistryKey failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&keyName, L"Targets");
|
||||
|
||||
if (!NT_SUCCESS(status = WdfRegistryCreateKey(
|
||||
keyParams,
|
||||
&keyName,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyTargets
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&keyName, L"DualShock");
|
||||
|
||||
if (!NT_SUCCESS(status = WdfRegistryCreateKey(
|
||||
keyTargets,
|
||||
&keyName,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keyDS
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
DECLARE_UNICODE_STRING_SIZE(serialPath, 4);
|
||||
RtlUnicodeStringPrintf(&serialPath, L"%04d", this->_SerialNo);
|
||||
|
||||
if (!NT_SUCCESS(status = WdfRegistryCreateKey(
|
||||
keyDS,
|
||||
&serialPath,
|
||||
KEY_ALL_ACCESS,
|
||||
REG_OPTION_NON_VOLATILE,
|
||||
nullptr,
|
||||
WDF_NO_OBJECT_ATTRIBUTES,
|
||||
&keySerial
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryCreateKey failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
RtlUnicodeStringInit(&valueName, L"TargetMacAddress");
|
||||
|
||||
status = WdfRegistryQueryValue(
|
||||
keySerial,
|
||||
&valueName,
|
||||
sizeof(MAC_ADDRESS),
|
||||
&this->_TargetMacAddress,
|
||||
nullptr,
|
||||
nullptr
|
||||
);
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION,
|
||||
TRACE_DS4,
|
||||
"WdfRegistryQueryValue failed with status %!STATUS!",
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
"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);
|
||||
|
||||
WdfRegistryClose(keySerial);
|
||||
WdfRegistryClose(keyDS);
|
||||
WdfRegistryClose(keyTargets);
|
||||
WdfRegistryClose(keyParams);
|
||||
if (status == STATUS_OBJECT_NAME_NOT_FOUND)
|
||||
{
|
||||
GenerateRandomMacAddress(&this->_TargetMacAddress);
|
||||
|
||||
return STATUS_SUCCESS;
|
||||
if (!NT_SUCCESS(status = WdfRegistryAssignValue(
|
||||
keySerial,
|
||||
&valueName,
|
||||
REG_BINARY,
|
||||
sizeof(MAC_ADDRESS),
|
||||
static_cast<PVOID>(&this->_TargetMacAddress)
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryAssignValue failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_DS4,
|
||||
"WdfRegistryQueryValue failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
WdfRegistryClose(keySerial);
|
||||
WdfRegistryClose(keyDS);
|
||||
WdfRegistryClose(keyTargets);
|
||||
WdfRegistryClose(keyParams);
|
||||
|
||||
} while (FALSE);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
VOID ViGEm::Bus::Targets::EmulationTargetDS4::GetConfigurationDescriptorType(PUCHAR Buffer, ULONG Length)
|
||||
@@ -999,8 +997,8 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbGetStringDescriptorType(PUR
|
||||
|
||||
NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbBulkOrInterruptTransfer(_URB_BULK_OR_INTERRUPT_TRANSFER* pTransfer, WDFREQUEST Request)
|
||||
{
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
WDFREQUEST notifyRequest;
|
||||
NTSTATUS status = STATUS_SUCCESS;
|
||||
WDFREQUEST notifyRequest;
|
||||
|
||||
// Data coming FROM us TO higher driver
|
||||
if (pTransfer->TransferFlags & USBD_TRANSFER_DIRECTION_IN
|
||||
@@ -1023,6 +1021,37 @@ NTSTATUS ViGEm::Bus::Targets::EmulationTargetDS4::UsbBulkOrInterruptTransfer(_UR
|
||||
static_cast<PUCHAR>(pTransfer->TransferBuffer) + DS4_OUTPUT_BUFFER_OFFSET,
|
||||
DS4_OUTPUT_BUFFER_LENGTH);
|
||||
|
||||
|
||||
this->_AwaitOutputCache.Size = sizeof(DS4_AWAIT_OUTPUT);
|
||||
this->_AwaitOutputCache.SerialNo = this->_SerialNo;
|
||||
RtlCopyMemory(
|
||||
this->_AwaitOutputCache.Report.Buffer,
|
||||
pTransfer->TransferBuffer,
|
||||
pTransfer->TransferBufferLength <= sizeof(DS4_OUTPUT_BUFFER)
|
||||
? pTransfer->TransferBufferLength
|
||||
: sizeof(DS4_OUTPUT_BUFFER)
|
||||
);
|
||||
|
||||
DumpAsHex("!! XUSB_REQUEST_NOTIFICATION",
|
||||
&this->_AwaitOutputCache,
|
||||
sizeof(DS4_AWAIT_OUTPUT)
|
||||
);
|
||||
|
||||
if (!NT_SUCCESS(status = DMF_NotifyUserWithRequestMultiple_DataBroadcast(
|
||||
this->_OutputReportNotify,
|
||||
&this->_AwaitOutputCache,
|
||||
sizeof(DS4_AWAIT_OUTPUT),
|
||||
STATUS_SUCCESS
|
||||
)))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_USBPDO,
|
||||
"DMF_NotifyUserWithRequestMultiple_DataBroadcast failed with status %!STATUS!",
|
||||
status
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
if (NT_SUCCESS(WdfIoQueueRetrieveNextRequest(
|
||||
this->_PendingNotificationRequests,
|
||||
¬ifyRequest)))
|
||||
@@ -1328,3 +1357,13 @@ VOID ViGEm::Bus::Targets::EmulationTargetDS4::PendingUsbRequestsTimerFunc(
|
||||
|
||||
TraceVerbose(TRACE_DS4, "%!FUNC! Exit with status %!STATUS!", status);
|
||||
}
|
||||
|
||||
VOID ViGEm::Bus::Targets::EmulationTargetDS4::DmfDeviceModulesAdd(_In_ PDMFMODULE_INIT DmfModuleInit)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModuleInit);
|
||||
}
|
||||
|
||||
VOID ViGEm::Bus::Targets::EmulationTargetDS4::SetOutputReportNotifyModule(DMFMODULE Module)
|
||||
{
|
||||
this->_OutputReportNotify = Module;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace ViGEm::Bus::Targets
|
||||
UCHAR Nic1;
|
||||
UCHAR Nic2;
|
||||
} MAC_ADDRESS, * PMAC_ADDRESS;
|
||||
|
||||
|
||||
constexpr unsigned char hid_get_report_id(struct _URB_CONTROL_VENDOR_OR_CLASS_REQUEST* pReq)
|
||||
{
|
||||
return pReq->Value & 0xFF;
|
||||
@@ -70,8 +70,8 @@ namespace ViGEm::Bus::Targets
|
||||
EmulationTargetDS4(ULONG Serial, LONG SessionId, USHORT VendorId = 0x054C, USHORT ProductId = 0x05C4);
|
||||
|
||||
NTSTATUS PdoPrepareDevice(PWDFDEVICE_INIT DeviceInit,
|
||||
PUNICODE_STRING DeviceId,
|
||||
PUNICODE_STRING DeviceDescription) override;
|
||||
PUNICODE_STRING DeviceId,
|
||||
PUNICODE_STRING DeviceDescription) override;
|
||||
|
||||
NTSTATUS PdoPrepareHardware() override;
|
||||
|
||||
@@ -84,21 +84,23 @@ namespace ViGEm::Bus::Targets
|
||||
NTSTATUS SelectConfiguration(PURB Urb) override;
|
||||
|
||||
void AbortPipe() override;
|
||||
|
||||
|
||||
NTSTATUS UsbClassInterface(PURB Urb) override;
|
||||
|
||||
|
||||
NTSTATUS UsbGetDescriptorFromInterface(PURB Urb) override;
|
||||
|
||||
|
||||
NTSTATUS UsbSelectInterface(PURB Urb) override;
|
||||
|
||||
|
||||
NTSTATUS UsbGetStringDescriptorType(PURB Urb) override;
|
||||
|
||||
|
||||
NTSTATUS UsbBulkOrInterruptTransfer(_URB_BULK_OR_INTERRUPT_TRANSFER* pTransfer, WDFREQUEST Request) override;
|
||||
|
||||
|
||||
NTSTATUS UsbControlTransfer(PURB Urb) override;
|
||||
|
||||
|
||||
NTSTATUS SubmitReportImpl(PVOID NewReport) override;
|
||||
|
||||
|
||||
VOID SetOutputReportNotifyModule(DMFMODULE Module);
|
||||
|
||||
private:
|
||||
static EVT_WDF_TIMER PendingUsbRequestsTimerFunc;
|
||||
|
||||
@@ -108,6 +110,8 @@ namespace ViGEm::Bus::Targets
|
||||
|
||||
protected:
|
||||
void ProcessPendingNotification(WDFQUEUE Queue) override;
|
||||
|
||||
void DmfDeviceModulesAdd(_In_ PDMFMODULE_INIT DmfModuleInit) override;
|
||||
private:
|
||||
static PCWSTR _deviceDescription;
|
||||
|
||||
@@ -159,6 +163,16 @@ namespace ViGEm::Bus::Targets
|
||||
//
|
||||
// Default MAC address of the host (not used)
|
||||
//
|
||||
MAC_ADDRESS _HostMacAddress;
|
||||
MAC_ADDRESS _HostMacAddress;
|
||||
|
||||
//
|
||||
// User-mode notification on new output report
|
||||
//
|
||||
DMFMODULE _OutputReportNotify;
|
||||
|
||||
//
|
||||
// Memory for full output report request
|
||||
//
|
||||
DS4_AWAIT_OUTPUT _AwaitOutputCache;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -57,6 +57,8 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
WDF_IO_QUEUE_CONFIG usbInQueueConfig;
|
||||
WDF_IO_QUEUE_CONFIG notificationsQueueConfig;
|
||||
PEMULATION_TARGET_PDO_CONTEXT pPdoContext;
|
||||
PDMFDEVICE_INIT dmfDeviceInit = NULL;
|
||||
DMF_EVENT_CALLBACKS dmfEventCallbacks;
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_BUSPDO, "%!FUNC! Entry");
|
||||
|
||||
@@ -71,11 +73,25 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
|
||||
// set device type
|
||||
WdfDeviceInitSetDeviceType(DeviceInit, FILE_DEVICE_BUS_EXTENDER);
|
||||
// Bus is power policy owner
|
||||
WdfDeviceInitSetPowerPolicyOwnership(DeviceInit, FALSE);
|
||||
|
||||
do
|
||||
{
|
||||
dmfDeviceInit = DMF_DmfDeviceInitAllocate(DeviceInit);
|
||||
|
||||
if (dmfDeviceInit == NULL)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_BUSPDO,
|
||||
"DMF_DmfDeviceInitAllocate failed"
|
||||
);
|
||||
status = STATUS_NO_MEMORY;
|
||||
break;
|
||||
}
|
||||
|
||||
DMF_DmfDeviceInitHookPnpPowerEventCallbacks(dmfDeviceInit, NULL);
|
||||
DMF_DmfDeviceInitHookFileObjectConfig(dmfDeviceInit, NULL);
|
||||
DMF_DmfDeviceInitHookPowerPolicyEventCallbacks(dmfDeviceInit, NULL);
|
||||
|
||||
#pragma region Prepare PDO
|
||||
|
||||
status = this->PdoPrepareDevice(DeviceInit, &deviceId, &deviceDescription);
|
||||
@@ -128,7 +144,6 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
}
|
||||
|
||||
// default locale is English
|
||||
// TODO: add more locales
|
||||
WdfPdoInitSetDefaultLocale(DeviceInit, 0x409);
|
||||
|
||||
#pragma region PNP/Power event callbacks
|
||||
@@ -141,9 +156,6 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
|
||||
#pragma endregion
|
||||
|
||||
// NOTE: not utilized at the moment
|
||||
WdfPdoInitAllowForwardingRequestToParent(DeviceInit);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region Create PDO
|
||||
@@ -278,6 +290,8 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
|
||||
defaultPdoQueueConfig.EvtIoInternalDeviceControl = EvtIoInternalDeviceControl;
|
||||
|
||||
DMF_DmfDeviceInitHookQueueConfig(dmfDeviceInit, &defaultPdoQueueConfig);
|
||||
|
||||
status = WdfIoQueueCreate(
|
||||
this->_PdoDevice,
|
||||
&defaultPdoQueueConfig,
|
||||
@@ -317,8 +331,41 @@ NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::PdoCreateDevice(WDFDEVICE ParentD
|
||||
WdfDeviceSetPowerCapabilities(this->_PdoDevice, &this->_PowerCapabilities);
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region DMF Initialization
|
||||
|
||||
DMF_EVENT_CALLBACKS_INIT(&dmfEventCallbacks);
|
||||
dmfEventCallbacks.EvtDmfDeviceModulesAdd = DmfDeviceModulesAdd;
|
||||
DMF_DmfDeviceInitSetEventCallbacks(dmfDeviceInit, &dmfEventCallbacks);
|
||||
|
||||
if (!NT_SUCCESS(status = DMF_ModulesCreate(
|
||||
this->_PdoDevice,
|
||||
&dmfDeviceInit
|
||||
)))
|
||||
{
|
||||
TraceEvents(
|
||||
TRACE_LEVEL_ERROR,
|
||||
TRACE_DS4,
|
||||
"DMF_ModulesCreate failed with status %!STATUS!",
|
||||
status
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
|
||||
} while (FALSE);
|
||||
|
||||
if (dmfDeviceInit)
|
||||
{
|
||||
DMF_DmfDeviceInitFree(&dmfDeviceInit);
|
||||
}
|
||||
|
||||
if (!NT_SUCCESS(status) && this->_PdoDevice != nullptr)
|
||||
{
|
||||
WdfObjectDelete(this->_PdoDevice);
|
||||
}
|
||||
|
||||
TraceEvents(TRACE_LEVEL_INFORMATION, TRACE_BUSPDO, "%!FUNC! Exit with status %!STATUS!", status);
|
||||
|
||||
return status;
|
||||
@@ -830,7 +877,6 @@ BOOLEAN ViGEm::Bus::Core::EmulationTargetPDO::EvtChildListIdentificationDescript
|
||||
return (lhs->SerialNo == rhs->SerialNo) ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS ViGEm::Bus::Core::EmulationTargetPDO::EnqueueWaitDeviceReady(WDFDEVICE ParentDevice, ULONG SerialNo,
|
||||
WDFREQUEST Request)
|
||||
{
|
||||
@@ -1183,3 +1229,10 @@ void ViGEm::Bus::Core::EmulationTargetPDO::EvtWdfIoPendingNotificationQueueState
|
||||
|
||||
pThis->ProcessPendingNotification(Queue);
|
||||
}
|
||||
|
||||
VOID ViGEm::Bus::Core::EmulationTargetPDO::DmfDeviceModulesAdd(_In_ WDFDEVICE Device, _In_ PDMFMODULE_INIT DmfModuleInit)
|
||||
{
|
||||
const auto pThis = static_cast<EmulationTargetPDO*>(EmulationTargetPdoGetContext(Device)->Target);
|
||||
|
||||
pThis->DmfDeviceModulesAdd(DmfModuleInit);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ namespace ViGEm::Bus::Core
|
||||
);
|
||||
|
||||
NTSTATUS EnqueueWaitDeviceReady(WDFREQUEST Request);
|
||||
|
||||
|
||||
HANDLE _WaitDeviceReadyCompletionWorkerThreadHandle{};
|
||||
|
||||
protected:
|
||||
@@ -147,7 +147,7 @@ namespace ViGEm::Bus::Core
|
||||
static const int MAX_INSTANCE_ID_LEN = 80;
|
||||
|
||||
static const size_t MAX_OUT_BUFFER_QUEUE_COUNT = 64;
|
||||
|
||||
|
||||
static const size_t MAX_OUT_BUFFER_QUEUE_SIZE = 128;
|
||||
|
||||
static PCWSTR _deviceLocation;
|
||||
@@ -181,7 +181,9 @@ namespace ViGEm::Bus::Core
|
||||
static VOID WaitDeviceReadyCompletionWorkerRoutine(IN PVOID StartContext);
|
||||
|
||||
static VOID DumpAsHex(PCSTR Prefix, PVOID Buffer, ULONG BufferLength);
|
||||
|
||||
|
||||
static VOID DmfDeviceModulesAdd(_In_ WDFDEVICE Device, _In_ PDMFMODULE_INIT DmfModuleInit);
|
||||
|
||||
virtual VOID GetConfigurationDescriptorType(PUCHAR Buffer, ULONG Length) = 0;
|
||||
|
||||
virtual NTSTATUS SelectConfiguration(PURB Urb) = 0;
|
||||
@@ -192,6 +194,8 @@ namespace ViGEm::Bus::Core
|
||||
|
||||
virtual VOID ProcessPendingNotification(WDFQUEUE Queue) = 0;
|
||||
|
||||
virtual void DmfDeviceModulesAdd(_In_ PDMFMODULE_INIT DmfModuleInit) = 0;
|
||||
|
||||
//
|
||||
// PNP Capabilities may differ from device to device
|
||||
//
|
||||
|
||||
801
sys/Queue.cpp
801
sys/Queue.cpp
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -49,430 +49,483 @@ using ViGEm::Bus::Targets::EmulationTargetDS4;
|
||||
|
||||
EXTERN_C_START
|
||||
|
||||
//
|
||||
// Responds to I/O control requests sent to the FDO.
|
||||
//
|
||||
VOID Bus_EvtIoDeviceControl(
|
||||
IN WDFQUEUE Queue,
|
||||
IN WDFREQUEST Request,
|
||||
IN size_t OutputBufferLength,
|
||||
IN size_t InputBufferLength,
|
||||
IN ULONG IoControlCode
|
||||
NTSTATUS
|
||||
Bus_CheckVersionHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
NTSTATUS status = STATUS_INVALID_PARAMETER;
|
||||
WDFDEVICE Device;
|
||||
size_t length = 0;
|
||||
PXUSB_SUBMIT_REPORT xusbSubmit = nullptr;
|
||||
PXUSB_REQUEST_NOTIFICATION xusbNotify = nullptr;
|
||||
PDS4_SUBMIT_REPORT ds4Submit = nullptr;
|
||||
PDS4_REQUEST_NOTIFICATION ds4Notify = nullptr;
|
||||
PVIGEM_CHECK_VERSION pCheckVersion = nullptr;
|
||||
PVIGEM_WAIT_DEVICE_READY pWaitDeviceReady = nullptr;
|
||||
PXUSB_GET_USER_INDEX pXusbGetUserIndex = nullptr;
|
||||
EmulationTargetPDO* pdo;
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Queue);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
Device = WdfIoQueueGetDevice(Queue);
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "%!FUNC! Entry (device: 0x%p)", Device);
|
||||
PVIGEM_CHECK_VERSION pCheckVersion = (PVIGEM_CHECK_VERSION)InputBuffer;
|
||||
|
||||
switch (IoControlCode)
|
||||
NTSTATUS status = (pCheckVersion->Version == VIGEM_COMMON_VERSION) ? STATUS_SUCCESS : STATUS_NOT_SUPPORTED;
|
||||
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Requested version: 0x%04X, compiled version: 0x%04X",
|
||||
pCheckVersion->Version, VIGEM_COMMON_VERSION);
|
||||
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
Bus_WaitDeviceReadyHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
NTSTATUS status;
|
||||
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
PVIGEM_WAIT_DEVICE_READY pWaitDeviceReady = (PVIGEM_WAIT_DEVICE_READY)InputBuffer;
|
||||
|
||||
// This request only supports a single PDO at a time
|
||||
if (pWaitDeviceReady->SerialNo == 0)
|
||||
{
|
||||
#pragma region IOCTL_VIGEM_CHECK_VERSION
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
case IOCTL_VIGEM_CHECK_VERSION:
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_CHECK_VERSION");
|
||||
status = EmulationTargetPDO::EnqueueWaitDeviceReady(
|
||||
WdfIoQueueGetDevice(Queue),
|
||||
pWaitDeviceReady->SerialNo,
|
||||
Request
|
||||
);
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(VIGEM_CHECK_VERSION),
|
||||
reinterpret_cast<PVOID*>(&pCheckVersion),
|
||||
&length
|
||||
);
|
||||
status = NT_SUCCESS(status) ? STATUS_PENDING : STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
|
||||
if (!NT_SUCCESS(status) || length != sizeof(VIGEM_CHECK_VERSION))
|
||||
{
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
status = (pCheckVersion->Version == VIGEM_COMMON_VERSION) ? STATUS_SUCCESS : STATUS_NOT_SUPPORTED;
|
||||
return status;
|
||||
}
|
||||
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Requested version: 0x%04X, compiled version: 0x%04X",
|
||||
pCheckVersion->Version, VIGEM_COMMON_VERSION);
|
||||
NTSTATUS
|
||||
Bus_PluginTargetHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBuffer);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
break;
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
#pragma endregion
|
||||
NTSTATUS status = Bus_PlugInDevice(WdfIoQueueGetDevice(Queue), Request, FALSE, BytesReturned);
|
||||
|
||||
#pragma region IOCTL_VIGEM_WAIT_DEVICE_READY
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
case IOCTL_VIGEM_WAIT_DEVICE_READY:
|
||||
return status;
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_WAIT_DEVICE_READY");
|
||||
NTSTATUS
|
||||
Bus_UnplugTargetHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBuffer);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(VIGEM_WAIT_DEVICE_READY),
|
||||
reinterpret_cast<PVOID*>(&pWaitDeviceReady),
|
||||
&length
|
||||
);
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
if (!NT_SUCCESS(status) || length != sizeof(VIGEM_WAIT_DEVICE_READY))
|
||||
{
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
NTSTATUS status = Bus_UnPlugDevice(WdfIoQueueGetDevice(Queue), Request, FALSE, BytesReturned);
|
||||
|
||||
// This request only supports a single PDO at a time
|
||||
if (pWaitDeviceReady->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
status = EmulationTargetPDO::EnqueueWaitDeviceReady(
|
||||
Device,
|
||||
pWaitDeviceReady->SerialNo,
|
||||
Request
|
||||
);
|
||||
NTSTATUS
|
||||
Bus_XusbSubmitReportHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBuffer);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
status = NT_SUCCESS(status) ? STATUS_PENDING : STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
|
||||
break;
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
#pragma endregion
|
||||
NTSTATUS status;
|
||||
EmulationTargetPDO* pdo;
|
||||
PXUSB_SUBMIT_REPORT xusbSubmit = (PXUSB_SUBMIT_REPORT)InputBuffer;
|
||||
|
||||
#pragma region IOCTL_VIGEM_PLUGIN_TARGET
|
||||
// This request only supports a single PDO at a time
|
||||
if (xusbSubmit->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
case IOCTL_VIGEM_PLUGIN_TARGET:
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_PLUGIN_TARGET");
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(WdfIoQueueGetDevice(Queue), Xbox360Wired, xusbSubmit->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
status = pdo->SubmitReport(xusbSubmit);
|
||||
|
||||
status = Bus_PlugInDevice(Device, Request, FALSE, &length);
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
break;
|
||||
return status;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
NTSTATUS
|
||||
Bus_XusbRequestNotificationHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBuffer);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
#pragma region IOCTL_VIGEM_UNPLUG_TARGET
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
case IOCTL_VIGEM_UNPLUG_TARGET:
|
||||
NTSTATUS status;
|
||||
EmulationTargetPDO* pdo;
|
||||
PXUSB_REQUEST_NOTIFICATION xusbNotify = (PXUSB_REQUEST_NOTIFICATION)InputBuffer;
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_VIGEM_UNPLUG_TARGET");
|
||||
// This request only supports a single PDO at a time
|
||||
if (xusbNotify->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = Bus_UnPlugDevice(Device, Request, FALSE, &length);
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
break;
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(WdfIoQueueGetDevice(Queue), Xbox360Wired, xusbNotify->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
{
|
||||
status = pdo->EnqueueNotification(Request);
|
||||
|
||||
#pragma endregion
|
||||
status = (NT_SUCCESS(status)) ? STATUS_PENDING : status;
|
||||
}
|
||||
|
||||
#pragma region IOCTL_XUSB_SUBMIT_REPORT
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
case IOCTL_XUSB_SUBMIT_REPORT:
|
||||
return status;
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_XUSB_SUBMIT_REPORT");
|
||||
NTSTATUS
|
||||
Bus_Ds4SubmitReportHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(XUSB_SUBMIT_REPORT),
|
||||
reinterpret_cast<PVOID*>(&xusbSubmit),
|
||||
&length
|
||||
);
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
NTSTATUS status;
|
||||
EmulationTargetPDO* pdo;
|
||||
PDS4_SUBMIT_REPORT ds4Submit = (PDS4_SUBMIT_REPORT)InputBuffer;
|
||||
|
||||
if ((sizeof(XUSB_SUBMIT_REPORT) == xusbSubmit->Size) && (length == InputBufferLength))
|
||||
{
|
||||
// This request only supports a single PDO at a time
|
||||
if (xusbSubmit->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(Device, Xbox360Wired, xusbSubmit->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
status = pdo->SubmitReport(xusbSubmit);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region IOCTL_XUSB_REQUEST_NOTIFICATION
|
||||
|
||||
case 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))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Output buffer %d too small, require at least %d",
|
||||
static_cast<int>(OutputBufferLength), static_cast<int>(sizeof(XUSB_REQUEST_NOTIFICATION)));
|
||||
break;
|
||||
}
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(XUSB_REQUEST_NOTIFICATION),
|
||||
reinterpret_cast<PVOID*>(&xusbNotify),
|
||||
&length
|
||||
);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((sizeof(XUSB_REQUEST_NOTIFICATION) == xusbNotify->Size) && (length == InputBufferLength))
|
||||
{
|
||||
// This request only supports a single PDO at a time
|
||||
if (xusbNotify->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(Device, Xbox360Wired, xusbNotify->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
{
|
||||
status = pdo->EnqueueNotification(Request);
|
||||
|
||||
status = (NT_SUCCESS(status)) ? STATUS_PENDING : status;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region IOCTL_DS4_SUBMIT_REPORT
|
||||
|
||||
case IOCTL_DS4_SUBMIT_REPORT:
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "IOCTL_DS4_SUBMIT_REPORT");
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(DS4_SUBMIT_REPORT),
|
||||
reinterpret_cast<PVOID*>(&ds4Submit),
|
||||
&length
|
||||
);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Check if buffer is within expected bounds
|
||||
//
|
||||
if (length < sizeof(DS4_SUBMIT_REPORT) || length > sizeof(DS4_SUBMIT_REPORT_EX))
|
||||
{
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Unexpected buffer size: %d",
|
||||
static_cast<ULONG>(length)
|
||||
);
|
||||
|
||||
status = STATUS_INVALID_BUFFER_SIZE;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// Check if this makes sense before passing it on
|
||||
//
|
||||
if (length != ds4Submit->Size)
|
||||
{
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Invalid buffer size: %d",
|
||||
ds4Submit->Size
|
||||
);
|
||||
|
||||
status = STATUS_INVALID_BUFFER_SIZE;
|
||||
break;
|
||||
}
|
||||
|
||||
//
|
||||
// This request only supports a single PDO at a time
|
||||
//
|
||||
if (ds4Submit->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(Device, DualShock4Wired, ds4Submit->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
status = pdo->SubmitReport(ds4Submit);
|
||||
|
||||
break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region IOCTL_DS4_REQUEST_NOTIFICATION
|
||||
|
||||
case 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))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Output buffer %d too small, require at least %d",
|
||||
static_cast<int>(OutputBufferLength), static_cast<int>(sizeof(DS4_REQUEST_NOTIFICATION)));
|
||||
break;
|
||||
}
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(DS4_REQUEST_NOTIFICATION),
|
||||
reinterpret_cast<PVOID*>(&ds4Notify),
|
||||
&length
|
||||
if (InputBufferSize < sizeof(DS4_SUBMIT_REPORT) || InputBufferSize > sizeof(DS4_SUBMIT_REPORT_EX))
|
||||
{
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Unexpected buffer size: %d",
|
||||
static_cast<ULONG>(InputBufferSize)
|
||||
);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"WdfRequestRetrieveInputBuffer failed with status %!STATUS!",
|
||||
status);
|
||||
break;
|
||||
}
|
||||
|
||||
if ((sizeof(DS4_REQUEST_NOTIFICATION) == ds4Notify->Size) && (length == InputBufferLength))
|
||||
{
|
||||
// This request only supports a single PDO at a time
|
||||
if (ds4Notify->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(Device, DualShock4Wired, ds4Notify->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
{
|
||||
status = pdo->EnqueueNotification(Request);
|
||||
|
||||
status = (NT_SUCCESS(status)) ? STATUS_PENDING : status;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#pragma region IOCTL_XUSB_GET_USER_INDEX
|
||||
|
||||
case 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))
|
||||
{
|
||||
KdPrint((DRIVERNAME "IOCTL_XUSB_GET_USER_INDEX: output buffer too small: %ul\n", OutputBufferLength));
|
||||
break;
|
||||
}
|
||||
|
||||
status = WdfRequestRetrieveInputBuffer(
|
||||
Request,
|
||||
sizeof(XUSB_GET_USER_INDEX),
|
||||
reinterpret_cast<PVOID*>(&pXusbGetUserIndex),
|
||||
&length);
|
||||
|
||||
if (!NT_SUCCESS(status))
|
||||
{
|
||||
KdPrint((DRIVERNAME "WdfRequestRetrieveInputBuffer failed 0x%x\n", status));
|
||||
break;
|
||||
}
|
||||
|
||||
if ((sizeof(XUSB_GET_USER_INDEX) == pXusbGetUserIndex->Size) && (length == InputBufferLength))
|
||||
{
|
||||
// This request only supports a single PDO at a time
|
||||
if (pXusbGetUserIndex->SerialNo == 0)
|
||||
{
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(Device, Xbox360Wired, pXusbGetUserIndex->SerialNo, &pdo))
|
||||
{
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
break;
|
||||
}
|
||||
|
||||
status = static_cast<EmulationTargetXUSB*>(pdo)->GetUserIndex(&pXusbGetUserIndex->UserIndex);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
#pragma endregion
|
||||
|
||||
default:
|
||||
|
||||
TraceEvents(TRACE_LEVEL_WARNING,
|
||||
TRACE_QUEUE,
|
||||
"Unknown I/O control code 0x%X", IoControlCode);
|
||||
|
||||
break; // default status is STATUS_INVALID_PARAMETER
|
||||
status = STATUS_INVALID_BUFFER_SIZE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (status != STATUS_PENDING)
|
||||
//
|
||||
// Check if this makes sense before passing it on
|
||||
//
|
||||
if (InputBufferSize != ds4Submit->Size)
|
||||
{
|
||||
WdfRequestCompleteWithInformation(Request, status, length);
|
||||
TraceVerbose(
|
||||
TRACE_QUEUE,
|
||||
"Invalid buffer size: %d",
|
||||
ds4Submit->Size
|
||||
);
|
||||
|
||||
status = STATUS_INVALID_BUFFER_SIZE;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
TraceVerbose(TRACE_QUEUE, "%!FUNC! Exit with status %!STATUS!", status);
|
||||
//
|
||||
// This request only supports a single PDO at a time
|
||||
//
|
||||
if (ds4Submit->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(WdfIoQueueGetDevice(Queue), DualShock4Wired, ds4Submit->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
status = pdo->SubmitReport(ds4Submit);
|
||||
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
Bus_Ds4RequestNotificationHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
NTSTATUS status;
|
||||
EmulationTargetPDO* pdo;
|
||||
PDS4_REQUEST_NOTIFICATION ds4Notify = (PDS4_REQUEST_NOTIFICATION)InputBuffer;
|
||||
|
||||
// This request only supports a single PDO at a time
|
||||
if (ds4Notify->SerialNo == 0)
|
||||
{
|
||||
TraceError(
|
||||
TRACE_QUEUE,
|
||||
"Invalid serial 0 submitted");
|
||||
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(WdfIoQueueGetDevice(Queue), DualShock4Wired, ds4Notify->SerialNo, &pdo))
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
else
|
||||
{
|
||||
status = pdo->EnqueueNotification(Request);
|
||||
|
||||
status = (NT_SUCCESS(status)) ? STATUS_PENDING : status;
|
||||
}
|
||||
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
Bus_XusbGetUserIndexHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModule);
|
||||
UNREFERENCED_PARAMETER(Request);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
NTSTATUS status;
|
||||
EmulationTargetPDO* pdo;
|
||||
PXUSB_GET_USER_INDEX pXusbGetUserIndex = (PXUSB_GET_USER_INDEX)InputBuffer;
|
||||
|
||||
// This request only supports a single PDO at a time
|
||||
if (pXusbGetUserIndex->SerialNo == 0)
|
||||
{
|
||||
status = STATUS_INVALID_PARAMETER;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!EmulationTargetPDO::GetPdoByTypeAndSerial(WdfIoQueueGetDevice(Queue), Xbox360Wired, pXusbGetUserIndex->SerialNo, &pdo))
|
||||
{
|
||||
status = STATUS_DEVICE_DOES_NOT_EXIST;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = static_cast<EmulationTargetXUSB*>(pdo)->GetUserIndex(&pXusbGetUserIndex->UserIndex);
|
||||
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
Bus_Ds4AwaitOutputHandler(
|
||||
_In_ DMFMODULE DmfModule,
|
||||
_In_ WDFQUEUE Queue,
|
||||
_In_ WDFREQUEST Request,
|
||||
_In_ ULONG IoctlCode,
|
||||
_In_reads_(InputBufferSize) VOID* InputBuffer,
|
||||
_In_ size_t InputBufferSize,
|
||||
_Out_writes_(OutputBufferSize) VOID* OutputBuffer,
|
||||
_In_ size_t OutputBufferSize,
|
||||
_Out_ size_t* BytesReturned
|
||||
)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(Queue);
|
||||
UNREFERENCED_PARAMETER(IoctlCode);
|
||||
UNREFERENCED_PARAMETER(OutputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBufferSize);
|
||||
UNREFERENCED_PARAMETER(InputBuffer);
|
||||
UNREFERENCED_PARAMETER(OutputBuffer);
|
||||
UNREFERENCED_PARAMETER(BytesReturned);
|
||||
|
||||
FuncEntry(TRACE_QUEUE);
|
||||
|
||||
NTSTATUS status;
|
||||
PFDO_DEVICE_DATA pDevCtx = FdoGetData(DMF_ParentDeviceGet(DmfModule));
|
||||
|
||||
if (!NT_SUCCESS(status = DMF_NotifyUserWithRequestMultiple_RequestProcess(
|
||||
pDevCtx->UserNotification,
|
||||
Request
|
||||
)))
|
||||
{
|
||||
goto exit;
|
||||
}
|
||||
|
||||
status = NT_SUCCESS(status) ? STATUS_PENDING : status;
|
||||
|
||||
exit:
|
||||
FuncExit(TRACE_QUEUE, "status=%!STATUS!", status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
@@ -37,6 +37,15 @@
|
||||
|
||||
EXTERN_C_START
|
||||
|
||||
EVT_WDF_IO_QUEUE_IO_DEVICE_CONTROL Bus_EvtIoDeviceControl;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_CheckVersionHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_WaitDeviceReadyHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_PluginTargetHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_UnplugTargetHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_XusbSubmitReportHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_XusbRequestNotificationHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_Ds4SubmitReportHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_Ds4RequestNotificationHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_XusbGetUserIndexHandler;
|
||||
EVT_DMF_IoctlHandler_Callback Bus_Ds4AwaitOutputHandler;
|
||||
|
||||
EXTERN_C_END
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
;
|
||||
; BSD 3-Clause License
|
||||
;
|
||||
; Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
; Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
; All rights reserved.
|
||||
;
|
||||
; Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -35,7 +35,7 @@ BEGIN
|
||||
VALUE "FileDescription", "Virtual Gamepad Emulation Framework Bus Driver"
|
||||
VALUE "FileVersion", "1.16.200.0"
|
||||
VALUE "InternalName", "Virtual Gamepad Emulation Framework Bus Driver"
|
||||
VALUE "LegalCopyright", "(C) 2016-2020 Nefarius Software Solutions e.U."
|
||||
VALUE "LegalCopyright", "(C) 2016-2022 Nefarius Software Solutions e.U."
|
||||
VALUE "OriginalFilename", "ViGEmBus.sys"
|
||||
VALUE "ProductName", "Virtual Gamepad Emulation Framework Bus Driver"
|
||||
VALUE "ProductVersion", "1.16.200.0"
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
<Configuration>Debug</Configuration>
|
||||
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
||||
<RootNamespace>ViGEmBus</RootNamespace>
|
||||
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
|
||||
<WindowsTargetPlatformVersion>10.0.19041.0</WindowsTargetPlatformVersion>
|
||||
<AppVeyorBuildVersion Condition=" '$(APPVEYOR_BUILD_VERSION)' == '' ">*</AppVeyorBuildVersion>
|
||||
<AppVeyorBuildVersion Condition=" '$(APPVEYOR_BUILD_VERSION)' != '' ">$(APPVEYOR_BUILD_VERSION)</AppVeyorBuildVersion>
|
||||
</PropertyGroup>
|
||||
@@ -129,6 +129,7 @@
|
||||
<DriverType>KMDF</DriverType>
|
||||
<DriverTargetPlatform>Universal</DriverTargetPlatform>
|
||||
<Inf2CatUseLocalTime>true</Inf2CatUseLocalTime>
|
||||
<SignMode>Off</SignMode>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
|
||||
@@ -212,7 +213,7 @@
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
@@ -226,9 +227,12 @@
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<PreprocessorDefinitions>_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_X86_=1;i386=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
|
||||
@@ -243,7 +247,7 @@
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<PreprocessorDefinitions>_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
@@ -257,9 +261,12 @@
|
||||
<WppRecorderEnabled>true</WppRecorderEnabled>
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<PreprocessorDefinitions>_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_WIN64;_AMD64_;AMD64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
<WholeProgramOptimization>true</WholeProgramOptimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>$(DDK_LIB_PATH)wdmsec.lib;%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
|
||||
@@ -275,6 +282,7 @@
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_ARM_;ARM;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
|
||||
@@ -287,6 +295,9 @@
|
||||
<WppScanConfigurationData Condition="'%(ClCompile.ScanConfigurationData)' == ''">trace.h</WppScanConfigurationData>
|
||||
<WppKernelMode>true</WppKernelMode>
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_ARM_;ARM;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib</AdditionalDependencies>
|
||||
@@ -301,6 +312,7 @@
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<DisableSpecificWarnings>5040;4064;4627;4627;4366;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
|
||||
@@ -315,10 +327,16 @@
|
||||
<AdditionalIncludeDirectories>$(SolutionDir)include;$(SolutionDir)sdk\include;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
||||
<LanguageStandard>stdcpp17</LanguageStandard>
|
||||
<DisableSpecificWarnings>5040;4064;4627;4627;4366;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||
<PreprocessorDefinitions>POOL_NX_OPTIN=1;POOL_ZERO_DOWN_LEVEL_SUPPORT;_ARM64_;ARM64;_USE_DECLSPECS_FOR_SAL=1;STD_CALL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);ntstrsafe.lib;usbdex.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<Inf>
|
||||
<TimeStamp>1.0.0.0</TimeStamp>
|
||||
</Inf>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<FilesToPackage Include="$(TargetPath)" />
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -1138,3 +1138,8 @@ void ViGEm::Bus::Targets::EmulationTargetXUSB::ProcessPendingNotification(WDFQUE
|
||||
|
||||
TraceVerbose(TRACE_BUSENUM, "%!FUNC! Exit");
|
||||
}
|
||||
|
||||
VOID ViGEm::Bus::Targets::EmulationTargetXUSB::DmfDeviceModulesAdd(_In_ PDMFMODULE_INIT DmfModuleInit)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(DmfModuleInit);
|
||||
}
|
||||
|
||||
@@ -99,6 +99,7 @@ namespace ViGEm::Bus::Targets
|
||||
|
||||
protected:
|
||||
void ProcessPendingNotification(WDFQUEUE Queue) override;
|
||||
void DmfDeviceModulesAdd(_In_ PDMFMODULE_INIT DmfModuleInit) override;
|
||||
private:
|
||||
static PCWSTR _deviceDescription;
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -189,6 +189,11 @@ EXTERN_C NTSTATUS Bus_PlugInDevice(
|
||||
goto pluginEnd;
|
||||
}
|
||||
|
||||
if (plugIn->TargetType == DualShock4Wired)
|
||||
{
|
||||
static_cast<EmulationTargetDS4*>(description.Target)->SetOutputReportNotifyModule(FdoGetData(Device)->UserNotification);
|
||||
}
|
||||
|
||||
status = WdfChildListAddOrUpdateChildDescriptionAsPresent(
|
||||
WdfFdoGetDefaultChildList(Device),
|
||||
&description.Header,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* BSD 3-Clause License
|
||||
*
|
||||
* Copyright (c) 2018-2020, Nefarius Software Solutions e.U. and Contributors
|
||||
* Copyright (c) 2018-2022, Nefarius Software Solutions e.U. and Contributors
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
||||
Reference in New Issue
Block a user