You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings: Save Battery row needs the shared console UI #31
A Save Battery switch in the console's Settings, on the Switch only. The title already reads and acts on it (branch clock-control, PR #15). The row itself has to come from the shared console UI in the monorepo, because the settings rows are a fixed table there (crates/client/pf-console-ui/src/screens/settings/rows.rs).
How the title uses it
By default the title holds its own clocks: CPU 1428, GPU 422.4 (handheld) and memory 1600 MHz in the menu; CPU 1785 and memory 1600 in the stream.
With Save Battery on, it holds nothing and leaves the clocks to the system (CPU 1020 in handheld). It lets go of a sys-clk or Horizon OC override, or puts the stock rates back when no module is running.
The value is Settings::extra["nx.save_battery"], a bool. A missing key means off. The menu reads it every frame, so flipping the row takes effect at once.
What the monorepo needs
In pf-console-ui/src/screens/settings/rows.rs, following an existing Extra::Bool row such as PhoneRumble or BackgroundKeepAlive:
A new RowId::SaveBattery.
A key "nx.save_battery", for example in a switch_keys module next to device_keys.
In RowId::extra: RowId::SaveBattery => Extra::Bool(SAVE_BATTERY_KEY, false).
In row_on: RowId::SaveBattery => &[Switch].
A place in a section. It belongs with the device rows rather than the host ones; not an advanced row.
A label, a hint and an icon, with strings in pf-l10n. Suggested text:
Label: "Save Battery"
Hint: "Leaves the CPU, GPU and memory clocks to the system. Streams use a little less power and may show a little more latency."
What this repo does after that
Bump the monorepo rev in Cargo.toml (one value shared by every monorepo crate) to the commit that adds the row. That is the only change needed here: the next build after the bump shows the row, and the title already obeys it.
Testing before the row exists
Edit settings.json in the title's folder on the SD card and add "nx.save_battery": true inside "extra".
Activity