DualSenseMultiplatform.GamepadCore
0.0.10
dotnet add package DualSenseMultiplatform.GamepadCore --version 0.0.10
NuGet\Install-Package DualSenseMultiplatform.GamepadCore -Version 0.0.10
<PackageReference Include="DualSenseMultiplatform.GamepadCore" Version="0.0.10" />
<PackageVersion Include="DualSenseMultiplatform.GamepadCore" Version="0.0.10" />
<PackageReference Include="DualSenseMultiplatform.GamepadCore" />
paket add DualSenseMultiplatform.GamepadCore --version 0.0.10
#r "nuget: DualSenseMultiplatform.GamepadCore, 0.0.10"
#:package DualSenseMultiplatform.GamepadCore@0.0.10
#addin nuget:?package=DualSenseMultiplatform.GamepadCore&version=0.0.10
#tool nuget:?package=DualSenseMultiplatform.GamepadCore&version=0.0.10
📦 Gamepad-Core NuGet Guide
This documentation explains how to install and use the Gamepad-Core library in your C++ project via NuGet.
🔗 Repository Link
For complete information about the library, features, and other installation methods, visit the Main Repository.
🚀 Installation
You can add Gamepad-Core to your Visual Studio project in two ways:
1. Via NuGet Package Manager (GUI)
- In Visual Studio, right-click on your project in the Solution Explorer.
- Select Manage NuGet Packages....
- In the search field, search for
DualSenseMultiplatform.GamepadCore. - Click Install.
2. Via Package Manager Console
Open the console (Tools > NuGet Package Manager > Package Manager Console) and run:
Install-Package DualSenseMultiplatform.GamepadCore
🛠️ Project Configuration
After installation, the library will be ready for use. The NuGet package automatically configures the include (include) and linking (lib) paths for native C++ projects.
Minimal Example (Standalone C++)
#include "GCore/Templates/TBasicDeviceRegistry.h"
// 1. Choose your platform policy
#ifdef _WIN32
#include "Platform/windows/windows_hardware_policy.h"
using platform_hardware = windows_platform::windows_hardware;
#else
#include "Platform/linux/linux_hardware_policy.h"
using platform_hardware = linux_platform::linux_hardware;
#endif
// 2. Define your registry policy
#include "Examples/Adapters/Tests/test_device_registry_policy.h"
using DeviceRegistry = GamepadCore::TBasicDeviceRegistry<Test_DeviceRegistryPolicy>;
int main() {
// Initialize hardware layer
auto Hardware = std::make_unique<HardwareInfo>();
IPlatformHardwareInfo:: SetInstance(std::move(Hardware));
// Create device registry
auto Registry = std::make_unique<DeviceRegistry>();
// Game loop
while (true) {
float DeltaTime = 0.016f; // 60 FPS
// Scan for connected devices
Registry->PlugAndPlay(DeltaTime);
// Get first connected gamepad
if (auto* Gamepad = Registry->GetLibrary(0)) {
if (Gamepad->IsConnected()) {
// Update input state
Gamepad->UpdateInput(DeltaTime);
// Read button state
auto Context = Gamepad->GetMutableDeviceContext();
auto Input = Context->GetInputState();
if (Input.bCross) {
// Trigger haptic feedback
Gamepad->SetLightbar({255, 0, 0});
Gamepad->SetRumble(255, 128);
}
// Control adaptive triggers
if (auto* Trigger = Gamepad->GetIGamepadTrigger()) {
Trigger->SetGameCube(EDSGamepadHand::AnyHand);
// Example Custom Trigger Bow(0x22)
std::vector<uint8_t> BufferTrigger(10);
BufferTrigger[0] = 0x22;
BufferTrigger[1] = 0x02;
BufferTrigger[2] = 0x01;
BufferTrigger[3] = 0x3f;
BufferTrigger[4] = 0x00;
BufferTrigger[5] = 0x00;
BufferTrigger[6] = 0x00;
BufferTrigger[7] = 0x00;
BufferTrigger[8] = 0x00;
BufferTrigger[9] = 0x00;
if (Trigger) {
// Trigger->SetBow22();
Trigger->SetCustomTrigger(EDSGamepadHand::Right, BufferTrigger);
}
}
// Audio Haptic Interface
if (auto* Haptic = Gamepad->IGamepadAudioHaptics()) {
// Convert audio buffer into haptic feedback
// Haptic->AudioHapticUpdate(<AudioData>);
}
}
}
std::this_thread::sleep_for(std::chrono::milliseconds(16));
}
}
Platform Policy Structure
Gamepad-Core uses policies to abstract OS-specific code:
Documentation on how to implement a new platform policy can be found here.
📝 Developer Notes (Package Generation)
If you wish to generate the .nupkg package manually from source code:
<details> <summary>Click to see generation instructions</summary>
Prerequisites
- nuget.exe: Download at nuget.org/downloads.
Generating via CMake
cmake --build cmake-build-release --target nuget-pack
Manually
# 1. Prepare staging
cmake --install cmake-build-release --prefix cmake-build-release/nuget_package
# 2. Pack
.\nuget.exe pack DualSenseMultiplatform.GamepadCore.nuspec -OutputDirectory cmake-build-release -BasePath cmake-build-release/nuget_package
</details>
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.0.10 | 237 | 2/16/2026 |