mirror of
https://github.com/games-on-whales/wolf.git
synced 2026-10-15 21:12:08 +00:00
[PR #464] [MERGED] fix(input): DualSense battery always reads low in Steam #482
Labels
No labels
🧠 1 - 🤖 999
AMD
bug
bug
cannot reproduce
documentation
duplicate
easy
enhancement
enhancement
enhancement
fixed?
fixed?
good first issue
hard
help wanted
Intel
invalid
LXC
medium
moonlight-protocol
Multi GPU
nixos
not a bug
nvidia
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
games-on-whales/wolf#482
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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)
d79e90efix(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.