[PR #464] [MERGED] fix(input): DualSense battery always reads low in Steam #482

Closed
opened 2026-10-15 13:00:54 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/wolf/pull/464
Author: @zerofltexx
Created: 7/25/2026
Status: ✅ Merged
Merged: 8/8/2026
Merged by: @ABeltramo

Base: stable ← Head: fix/dualsense-battery-report


📝 Commits (1)

  • d79e90e fix(input): DualSense battery always reads low

📊 Changes

1 file changed (+3 additions, -1 deletions)

View changed files

📝 src/moonlight-protocol/moonlight/control.hpp (+3 -1)

📄 Description

The emulated DualSense reports a near empty battery regardless of the real charge on the client's controller. Steam and games read that value off the pad, so in the session the controller shows as low. This is the battery the session app reads, not the host.

battery_state in CONTROLLER_BATTERY_PACKET is a 2 byte enum (unsigned short), but the field is one byte on the wire. The struct is packed, so the second byte overlaps battery_percentage and it always reads the trailing zero. set_battery() then gets 0 and sets the pad to empty.

The other one byte enums in this header (MOTION_TYPE, TOUCH_EVENT_TYPE) are uint8_t. BATTERY_STATE should be too. It has been unsigned short since the virtual inputs were split out of Moonlight, and the value only matters on the PS5 pad when the client reports battery, so the misparse stayed hidden.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/wolf/pull/464 **Author:** [@zerofltexx](https://github.com/zerofltexx) **Created:** 7/25/2026 **Status:** ✅ Merged **Merged:** 8/8/2026 **Merged by:** [@ABeltramo](https://github.com/ABeltramo) **Base:** `stable` ← **Head:** `fix/dualsense-battery-report` --- ### 📝 Commits (1) - [`d79e90e`](https://github.com/games-on-whales/wolf/commit/d79e90e729374cdbe5abdd775e18ad02212f60cf) fix(input): DualSense battery always reads low ### 📊 Changes **1 file changed** (+3 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/moonlight-protocol/moonlight/control.hpp` (+3 -1) </details> ### 📄 Description The emulated DualSense reports a near empty battery regardless of the real charge on the client's controller. Steam and games read that value off the pad, so in the session the controller shows as low. This is the battery the session app reads, not the host. battery_state in CONTROLLER_BATTERY_PACKET is a 2 byte enum (unsigned short), but the field is one byte on the wire. The struct is packed, so the second byte overlaps battery_percentage and it always reads the trailing zero. set_battery() then gets 0 and sets the pad to empty. The other one byte enums in this header (MOTION_TYPE, TOUCH_EVENT_TYPE) are uint8_t. BATTERY_STATE should be too. It has been unsigned short since the virtual inputs were split out of Moonlight, and the value only matters on the PS5 pad when the client reports battery, so the misparse stayed hidden. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-15 13:00:54 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/wolf#482
No description provided.