Join Us and become a Member for a Verified Badge on Discord to access private areas with the latest PS4 FPKGs.
PS5 CFW and Hacks       Thread starter PSXHAX       Start date Nov 23, 2020 at 1:59 AM       5,691       9      
Since the guide on How To Set Up a DualSense PS5 Controller on PC via Bluetooth or USB we have two more ways to get a DualSense PS5 Controller with Updatable Software running on Windows, the first is using the latest DS4Windows update with the other through DualSense Windows which is an API for the PS5 DualSense controller written in the C++ programming language. 🎮

While the first DualSense-Windows release is slated to arrive shortly (before November 28th), currently the only things missing from the latest DS4Windows v2.1.17 update are Adaptive Triggers and Haptic Feedback functionality.

Download: DS4Windows by Jays2Kings of DS4Windows.com / DS4Windows Fork by Ryochan7 / DualSense-Windows (DualSenseWindows_V0.1.zip) by Ohjurot / DualSenseWindows_UE4: UE4 Port of DualSense on Windows by KITATUS

This PS5 News comes following the DualSense Controller Charging Station unveiling, DualSense PS5 Disassembly Images, DualSense Teardown Video and DualSense PS5 Controller Modding video.

Be sure to drop by the PS5 Scene Forums to share any feedback, and from the README.md: DualSense / PS5 Controller 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.

:alert: 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
  1. Download the DualSenseWindows_VX.X.zip file from the latest release found at the Release Page
  2. Unzip the archive to your computer
  3. Read the DualSenseWindows.pdf PDF documentation to get the specific information for your current release
If you don't want to mess your time documentation - this is the minimal example on how to use the library:
Code:
#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 expected DS5W_E_DEVICE_REMOVED error is returned.
Special thanks to

Spoiler

DS4Windows Update Brings PS5 DualSense Support to Windows

The most recent update of DS4Windows brings support for the PS5 DualSense controller to Windows. Version 2.1.17, enables DS4Windows to be used in all games. This includes games from the Epic Games Store, Battle.net, GOG, Bethesda, and more.

Version 2.1.17
  • Implemented JoyCon support
  • Implemented DualSense support. Lightbar and rumble support only work with USB for now
  • Added workaround for DS4 reader when a duplicate timestamp is in a report. Fixes smoothing for UDP server output
  • Populate totalMicroSec in JoyConDevice and SwitchProDevice. Used in the UDP server output
  • Enabled Idle Disconnect for SwitchPro and JoyCon
DualSense PS5 Controller on Windows via DS4Windows & DualSense Windows.jpg
 

Comments

yodog

Member
Contributor
Verified
Awesome! I can't wait to feel the adaptive triggers in use! If only I had a PS5 but the bots keep buying them lol.
 

:fire: Latest Help Topics

Top