Skip to content

fix(#65): On battery, stream at caps PC and PS5 streams while unplugged - #90

Open
xservzeroman wants to merge 1 commit into
feat/fsrfrom
fix/battery-res
Open

xservzeroman wants to merge 1 commit into
feat/fsrfrom
fix/battery-res

Conversation

@xservzeroman

Copy link
Copy Markdown

Fixes #65: Settings, Handheld, "On battery, stream at" was saved (hh_battery_res) but nothing read it.

Changelog

  • home/BatteryCap.kt: the cap height when the setting isn't "same" and ACTION_BATTERY_CHANGED reports EXTRA_PLUGGED == 0; otherwise 0.
  • Game:
    • The cap is applied right after readPreferences, keeping the aspect ratio with the width a multiple of 8 (Native 2448×1696 at 720 becomes 1040×720).
    • sizeChanged() compares the screen with the uncapped size, so the fold refit doesn't reconnect a capped stream in a loop.
  • Ps5StreamActivity: the preset is the lower of the chosen one and the cap.
  • Handheld setting text: "Unplugged, PC and PS5 streams go no higher than this."
  • Xbox isn't changed (the Xbox service picks its resolution).
  • Build: test237. Lint: 0 errors.

To test

  • On the Odin or the Fold: set On battery to 720p and unplug (or adb shell dumpsys battery unplug), then start a PC game. The log should say on battery: stream … capped to …. Plug in and it streams at the Picture setting again.

🤖 Generated with Claude Code

…ed (test237)

BatteryCap reads hh_battery_res and the plugged state; Game caps prefConfig keeping the shape and
compares fold sizes with the uncapped size; Ps5StreamActivity takes the lower preset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants