Convert Figma logo to code with AI

Ryochan7 logoDS4Windows

Like those other ds4tools, but sexier

6,931
803
6,931
106

Top Related Projects

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers

Windows kernel-mode driver emulating well-known USB game controllers.

Like those other ds4tools, but sexier

[NOT maintained anymore] Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support

Quick Overview

DS4Windows is an open-source tool that allows users to use a DualShock 4 (PS4) controller on Windows PC games and applications. It emulates an Xbox 360 controller, providing compatibility with a wide range of games and customizable button mapping, sensitivity adjustments, and macro support.

Pros

  • Enables use of DualShock 4 controllers on Windows PCs with extensive customization options
  • Supports multiple controller profiles for different games or users
  • Offers advanced features like touchpad mouse emulation and motion controls
  • Regular updates and active community support

Cons

  • May require some technical knowledge to set up and configure optimally
  • Occasional compatibility issues with certain games or applications
  • Potential for input lag, though generally minimal
  • Relies on third-party drivers, which may pose security concerns for some users

Getting Started

  1. Download the latest release from the DS4Windows GitHub repository.
  2. Extract the zip file to a location on your PC.
  3. Run DS4Windows.exe.
  4. Connect your DualShock 4 controller via USB or Bluetooth.
  5. DS4Windows will automatically detect the controller and apply default settings.
  6. Customize your controller profile in the "Profiles" tab if desired.
  7. Start playing your games with your DualShock 4 controller recognized as an Xbox 360 controller.

Note: For first-time setup, you may need to install the ViGEmBus driver when prompted by the application.

Competitor Comparisons

Windows Driver and XInput Wrapper for Sony DualShock 3/4 Controllers

Pros of ScpToolkit

  • Supports a wider range of controllers, including PS3 controllers
  • Offers more advanced customization options for button mapping
  • Provides a user-friendly GUI for configuration

Cons of ScpToolkit

  • Less frequently updated compared to DS4Windows
  • May require additional setup steps for some controllers
  • Discontinued project with limited community support

Code Comparison

DS4Windows:

public class DS4Device
{
    public DS4State CurrentState;
    public DS4State PreviousState;
    public DS4State OutputState;
}

ScpToolkit:

public class ScpDevice : IDisposable
{
    public DsState PacketCounter { get; set; }
    public DsConnection Connection { get; set; }
    public DsBattery Battery { get; set; }
}

Both projects use C# for their core functionality, but DS4Windows focuses specifically on DS4 controllers, while ScpToolkit supports a broader range of devices. DS4Windows' code structure appears more streamlined for DS4-specific features, while ScpToolkit's code accommodates various controller types.

DS4Windows is actively maintained and receives regular updates, making it a more reliable choice for users primarily interested in DS4 controller support. ScpToolkit offers broader compatibility but lacks recent updates and ongoing development.

Windows kernel-mode driver emulating well-known USB game controllers.

Pros of ViGEmBus

  • Lower-level driver implementation, providing broader compatibility with various input devices
  • Can be used as a foundation for other input device emulation projects
  • Offers more granular control over virtual device creation and management

Cons of ViGEmBus

  • Requires more technical knowledge to implement and use effectively
  • Less user-friendly for end-users compared to DS4Windows' plug-and-play approach
  • May require additional software or scripts to achieve full functionality

Code Comparison

ViGEmBus (C):

NTSTATUS
Bus_EvtDeviceAdd(
    _In_ WDFDRIVER Driver,
    _Inout_ PWDFDEVICE_INIT DeviceInit
)
{
    // Device initialization code
}

DS4Windows (C#):

public class DS4Device
{
    public bool IsConnected { get; private set; }
    public void Connect()
    {
        // Connection logic
    }
}

ViGEmBus focuses on low-level driver implementation, while DS4Windows provides a higher-level, user-friendly interface for DualShock 4 controller support. ViGEmBus offers more flexibility but requires more technical expertise, whereas DS4Windows is easier to use but may have limitations in device compatibility.

Like those other ds4tools, but sexier

Pros of DS4Windows (Jays2Kings)

  • Original project with longer history and established user base
  • May have some legacy features not present in newer forks
  • Potentially more stable due to longer development time

Cons of DS4Windows (Jays2Kings)

  • No longer actively maintained or updated
  • May lack support for newer hardware or Windows versions
  • Fewer bug fixes and improvements compared to active forks

Code Comparison

DS4Windows (Jays2Kings):

public static void Stop(bool showNotification = true)
{
    if (running)
    {
        running = false;
        DS4Device.StopAll();
        if (showNotification)
            ShowNotification(Properties.Resources.StoppedText, Properties.Resources.StoppedTitle);
    }
}

DS4Windows (Ryochan7):

public static void Stop(bool showNotification = true)
{
    if (running)
    {
        running = false;
        DS4Device.StopAll();
        if (showNotification)
            ShowNotification(Properties.Resources.StoppedText, Properties.Resources.StoppedTitle);
        LogManager.Logger.Info("Stopped");
    }
}

The main difference in the code snippet is the addition of a logging statement in Ryochan7's version, which improves debugging and troubleshooting capabilities.

[NOT maintained anymore] Graphical program used to map keyboard buttons and mouse controls to a gamepad. Useful for playing games with no gamepad support

Pros of AntiMicro

  • Supports a wider range of input devices, including keyboards and mice
  • More versatile for general input remapping across various applications
  • Cross-platform compatibility (Windows, Linux, macOS)

Cons of AntiMicro

  • Less specialized for PlayStation controllers compared to DS4Windows
  • May require more manual configuration for complex mappings
  • Lacks some advanced features specific to DualShock/DualSense controllers

Code Comparison

DS4Windows (C#):

public class DS4Device
{
    public DS4State CurrentState;
    public DS4State PreviousState;
    // ... other properties and methods
}

AntiMicro (C++):

class JoyButton : public JoyControlStick
{
    Q_OBJECT
public:
    explicit JoyButton(int index, int originset, SetJoystick *parentSet, QObject *parent=0);
    // ... other methods
};

The code snippets show that DS4Windows is specifically designed for DualShock controllers, while AntiMicro has a more generic approach to input devices. DS4Windows uses a dedicated DS4State class, whereas AntiMicro employs a more general JoyButton class that inherits from JoyControlStick.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

DS4Windows

Like those other DS4 tools, but sexier.

DS4Windows is an extract anywhere program that allows you to get the best DualShock 4 experience on your PC. By emulating an Xbox 360 controller, many more games are accessible. Other input controllers are also supported including the DualSense, Switch Pro, and JoyCon controllers (first party hardware only).

This project is a fork of the work of Jays2Kings.

DS4Windows Preview

License

DS4Windows is licensed under the terms of the GNU General Public License version 3. You can find a copy of the terms and conditions of that license at https://www.gnu.org/licenses/gpl-3.0.txt. The license is also available in this source code from the COPYING file.

Downloads

Requirements

  • Windows 10 or newer (Thanks Microsoft)
  • Microsoft .NET 8.0 Desktop Runtime. x64 or x86
  • Visual C++ 2015-2022 Redistributable. x64 or x86
  • ViGEmBus driver (DS4Windows will install it for you)
  • Sony DualShock 4 or other supported controller
  • Connection method:
    • Micro USB cable
    • Sony Wireless Adapter
    • Bluetooth 4.0 (via an adapter like this or built in pc). Only use of Microsoft BT stack is supported. CSR BT stack is confirmed to not work with the DS4 even though some CSR adapters work fine using Microsoft BT stack. Toshiba's adapters currently do not work. Disabling 'Enable output data' in the controller profile settings might help with latency issues, but will disable lightbar and rumble support.
  • Disable PlayStation Configuration Support and Xbox Configuration Support options in Steam