f5eae24c87
ci / rust (push) Failing after 42s
apple / swift (push) Successful in 54s
ci / web (push) Successful in 29s
ci / docs-site (push) Successful in 32s
android / android (push) Successful in 1m47s
ci / bench (push) Successful in 1m35s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
deb / build-publish (push) Successful in 2m21s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 5m27s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 5m28s
docker / deploy-docs (push) Successful in 20s
The macOS Settings window had outgrown one scrolling pane — split it into a tabbed preferences window (General / Display / Audio / Controllers / Advanced). Each settings group is now a shared @ViewBuilder section, so iOS keeps its single grouped Form and tvOS its pushed-picker layout, each defined once. No setting moved or dropped. New statistics-overlay controls (Settings → Display → Statistics): a show/hide toggle (DefaultsKey.hudEnabled) and a corner picker (HUDPlacement / DefaultsKey.hudPlacement) — the HUD moves to the chosen corner and aligns its text to that edge. A Scene-level "Stream" menu (StreamCommands) carries Show/Hide Statistics (⌘⇧S) and Disconnect (⌘D). Disconnect moved off the HUD button into the menu so it survives the overlay being hidden, wired via .focusedSceneValue. On iOS a material-backed exit chip appears when the HUD is hidden (touch users have no menu/⌘D); tvOS disconnect is unchanged (Siri-Remote Menu button). Builds on macOS/iOS/tvOS; swift test green. Adversarially reviewed (8 findings refuted, 2 minor — the iOS exit-chip contrast fix is included here). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
2.2 KiB
Swift
36 lines
2.2 KiB
Swift
// One source of truth for the client's UserDefaults / @AppStorage keys. A magic-string key
|
|
// duplicated across a setting's writer (a Settings @AppStorage) and reader (e.g. a stream view
|
|
// reading UserDefaults) splits silently on a typo — the setting just stops taking effect. These
|
|
// live in PunktfunkKit because both the app and the kit's views read them.
|
|
|
|
import Foundation
|
|
|
|
/// Persisted-setting keys. The string VALUES are stable on disk — rename the symbol freely, but
|
|
/// never the string (it would orphan everyone's saved value).
|
|
public enum DefaultsKey {
|
|
public static let streamWidth = "punktfunk.width"
|
|
public static let streamHeight = "punktfunk.height"
|
|
public static let streamHz = "punktfunk.hz"
|
|
public static let compositor = "punktfunk.compositor"
|
|
public static let gamepadType = "punktfunk.gamepadType"
|
|
public static let gamepadID = "punktfunk.gamepadID"
|
|
public static let bitrateKbps = "punktfunk.bitrateKbps"
|
|
public static let micEnabled = "punktfunk.micEnabled"
|
|
public static let speakerUID = "punktfunk.speakerUID"
|
|
public static let micUID = "punktfunk.micUID"
|
|
public static let presenter = "punktfunk.presenter"
|
|
public static let hosts = "punktfunk.hosts"
|
|
/// Client-side cursor mode: "auto" (shown only in gamescope sessions), "always", "never".
|
|
public static let cursorMode = "punktfunk.cursorMode"
|
|
/// Experimental: show the host's game library (browsed over the management API). Off by default.
|
|
public static let libraryEnabled = "punktfunk.libraryEnabled"
|
|
/// macOS: take the window fullscreen while streaming and restore it on the host list. On by default.
|
|
public static let fullscreenWhileStreaming = "punktfunk.fullscreenWhileStreaming"
|
|
/// Show the streaming statistics overlay (mode/fps/throughput/latency). On by default; toggle
|
|
/// while streaming with ⌘⇧S (macOS / hardware keyboard).
|
|
public static let hudEnabled = "punktfunk.hudEnabled"
|
|
/// Which corner the statistics overlay sits in — a `HUDPlacement` raw value
|
|
/// ("topLeading"/"topTrailing"/"bottomLeading"/"bottomTrailing"). Default top-trailing.
|
|
public static let hudPlacement = "punktfunk.hudPlacement"
|
|
}
|