Ohjurot / Dualsense Windows
Licence: other
Windows API for the PS5 DualSense controller
Stars: ✭ 111
Projects that are alternatives of or similar to Dualsense Windows
DualSenseWindows UE4
Unreal Engine 4 port of the Windows API for the PS5 DualSense controller created at Ohjurot/DualSense-Windows
Stars: ✭ 25 (-77.48%)
Mutual labels: usb, bluetooth, gamepad
Apple Family
A simple framework that brings Apple devices together - like a family
Stars: ✭ 59 (-46.85%)
Mutual labels: usb, bluetooth
Openapi Generator
OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Stars: ✭ 10,634 (+9480.18%)
Mutual labels: api, sdk
Foal
Elegant and all-inclusive Node.Js web framework based on TypeScript. 🚀.
Stars: ✭ 1,176 (+959.46%)
Mutual labels: api, sdk
Openrouteservice R
🌐 R package to query openrouteservice.org
Stars: ✭ 57 (-48.65%)
Mutual labels: api, sdk
Directus Docker
Directus 6 Docker — Legacy Container [EOL]
Stars: ✭ 68 (-38.74%)
Mutual labels: api, sdk
Nodejs
Everything related to the Node.js ecosystem for the commercetools platform.
Stars: ✭ 47 (-57.66%)
Mutual labels: api, sdk
Uploadcare Php
PHP API client that handles uploads and further operations with files by wrapping Uploadcare Upload and REST APIs.
Stars: ✭ 77 (-30.63%)
Mutual labels: api, sdk
Amadeus Node
Node library for the Amadeus Self-Service travel APIs
Stars: ✭ 91 (-18.02%)
Mutual labels: api, sdk
Modio Unity
Unity Plugin for integrating mod.io - a modding API for game developers
Stars: ✭ 53 (-52.25%)
Mutual labels: api, sdk
Nestia
Automatic SDK and Document generator for the NestJS
Stars: ✭ 57 (-48.65%)
Mutual labels: api, sdk
Go Sdk
A composable toolbox of libraries to build everything from CLIs to enterprise applications.
Stars: ✭ 103 (-7.21%)
Mutual labels: api, sdk
Stream Deck Api
API to interact with the Elgato Stream Deck controller
Stars: ✭ 36 (-67.57%)
Mutual labels: api, usb
Modio Sdk Legacy
SDK for integrating mod.io into your game - a modding API for game developers
Stars: ✭ 75 (-32.43%)
Mutual labels: api, sdk
DualSense on Windows [API]
Windows API for the PS5 DualSense controller. Written in C++ for C++. This API will help you using the DualSense controller in your windows C++ Applications / Projects.
❗️ Warning: The current release state is still a preview release. The library may not work as intended!
Features
- Reading all button input from the controller
- Reading the analog sticks and analog triggers
- Reading the two finger touch positions
- Reading the Accelerometer and Gyroscope
- Using the haptic feedback for default rumbleing
- Controlling the adaptive triggers (3 Types of effects) and reading back the users force while active
- Controlling the RGB color of the lightbar
- Setting the player indication LEDs and the microphone LED
The library is still in active development and will be extended with additional features soon. Consider checking out our Road-map for further information.
Using the API
- Download the
DualSenseWindows_VX.X.zip
file from the latest release found at the Release Page - Unzip the archive to your computer
- Read the
DualSenseWindows.pdf
PDF documentation to get the specific information for your current release
If you don't want to waste time reading the documentation - this is the minimal example on how to use the library:
#include <Windows.h>
#include <ds5w.h>
#include <iostream>
int main(int argc, char** argv){
// Array of controller infos
DS5W::DeviceEnumInfo infos[16];
// Number of controllers found
unsigned int controllersCount = 0;
// Call enumerate function and switch on return value
switch(DS5W::enumDevices(infos, 16, &controllersCount)){
case DS5W_OK:
// The buffer was not big enough. Ignore for now
case DS5W_E_INSUFFICIENT_BUFFER:
break;
// Any other error will terminate the application
default:
// Insert your error handling
return -1;
}
// Check number of controllers
if(!controllersCount){
return -1;
}
// Context for controller
DS5W::DeviceContext con;
// Init controller and close application is failed
if(DS5W_FAILED(DS5W::initDeviceContext(&infos[0], &con))){
return -1;
}
// Main loop
while(true){
// Input state
DS5W::DS5InputState inState;
// Retrieve data
if (DS5W_SUCCESS(DS5W::getDeviceInputState(&con, &inState))){
// Check for the Logo button
if(inState.buttonsB & DS5W_ISTATE_BTN_B_PLAYSTATION_LOGO){
// Break from while loop
break;
}
// Create struct and zero it
DS5W::DS5OutputState outState;
ZeroMemory(&outState, sizeof(DS5W::DS5OutputState));
// Set output data
outState.leftRumble = inState.leftTrigger;
outState.rightRumble = inState.rightTrigger;
// Send output to the controller
DS5W::setDeviceOutputState(&con, &outState);
}
}
// Shutdown context
DS5W::freeDeviceContext(&con);
// Return zero
return 0;
}
Known issues
- When the controller being shut down while connected via Bluetooth (Holding the PS button). The lib will encounter a dead lock within
getDeviceInputState(...)
call. The function will return as soon as the controller is getting reconnected. Not encountering over USB, over USB the expectedDS5W_E_DEVICE_REMOVED
error is returned.
Special thanks to
I have partially used the following sources to implement the functionality:
- The GitHub community on this project and https://github.com/Ryochan7/DS4Windows/issues/1545
- https://www.reddit.com/r/gamedev/comments/jumvi5/dualsense_haptics_leds_and_more_hid_output_report/
- https://gist.github.com/dogtopus/894da226d73afb3bdd195df41b3a26aa
- https://gist.github.com/Ryochan7/ef8fabae34c0d8b30e2ab057f3e6e039
- https://gist.github.com/Ryochan7/91a9759deb5dff3096fc5afd50ba19e2
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].