Skip to content

Repository files navigation

Gamepad Core Host Python Client

A Windows Python CLI client for GamepadCoreHost.dll. It discovers supported Sony controllers through the Windows HID API, polls input, and demonstrates DualSense output features such as rumble, lightbar colors, and adaptive triggers.

Requirements

  • Windows
  • Python 3.10 or newer
  • A compatible GamepadCoreHost.dll build and its runtime dependencies
  • A supported Sony controller:
    • DualShock 4
    • DualSense
    • DualSense Edge

The client uses only Python's standard library; no packages need to be installed.

Related Repositories

Run

Use the configured default DLL path:

python main.py

Provide a DLL path explicitly:

python main.py --dll "C:\path\to\GamepadCoreHost.dll"

Continuously discover devices and process inputs:

python main.py --loop

Useful options:

-d, --dll PATH Path to GamepadCoreHost.dll
-l, --loop Run continuous discovery and input polling
-i, --interval TIME Loop interval in seconds
--info Display native API structure details

Controller Mapping

When a controller connects, the application displays the active mapping:

InputOutput
CrossHeavy rumble and red light
CircleSoft rumble and yellow light
SquareGameCube trigger effect message
TriangleStop adaptive triggers and set blue light
L1Gallop effect on L2
R1Machine effect on R2
D-pad UpFeedback (rigid) effect on R2
D-pad DownBow (tension) effect on R2
D-pad LeftWeapon (semi) effect on R2
D-pad RightAutomatic gun (buzz) effect on R2

Effects are applied only when a button transitions from released to pressed. Each output operation is committed through GCH_UpdateOutput.

Test

python -m unittest -v test_gamepad.py

The DLL integration test runs only when the configured DLL path exists.

Copyright

Copyright (c) 2026 valoto.games. All rights reserved.

About

Python CLI client for integrating, testing, and consuming the native Gamepad Core Host API.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages