DualSenseMultiplatform.GamepadCore 0.0.10

dotnet add package DualSenseMultiplatform.GamepadCore --version 0.0.10
                    
NuGet\Install-Package DualSenseMultiplatform.GamepadCore -Version 0.0.10
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DualSenseMultiplatform.GamepadCore" Version="0.0.10" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DualSenseMultiplatform.GamepadCore" Version="0.0.10" />
                    
Directory.Packages.props
<PackageReference Include="DualSenseMultiplatform.GamepadCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DualSenseMultiplatform.GamepadCore --version 0.0.10
                    
#r "nuget: DualSenseMultiplatform.GamepadCore, 0.0.10"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DualSenseMultiplatform.GamepadCore@0.0.10
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DualSenseMultiplatform.GamepadCore&version=0.0.10
                    
Install as a Cake Addin
#tool nuget:?package=DualSenseMultiplatform.GamepadCore&version=0.0.10
                    
Install as a Cake Tool

📦 Gamepad-Core NuGet Guide

This documentation explains how to install and use the Gamepad-Core library in your C++ project via NuGet.

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)

  1. In Visual Studio, right-click on your project in the Solution Explorer.
  2. Select Manage NuGet Packages....
  3. In the search field, search for DualSenseMultiplatform.GamepadCore.
  4. 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:

Windows Platform

Linux Platform

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

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>

There are no supported framework assets in this package.

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