38b9f310e2
ci / docs-site (push) Successful in 1m5s
apple / swift (push) Successful in 1m10s
ci / web (push) Successful in 1m12s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, --no-default-features, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 1m46s
windows-msix / package (x64, C:\Users\Public\ffmpeg, , x86_64-pc-windows-msvc, C:\t) (push) Successful in 1m57s
windows / build (aarch64-pc-windows-msvc) (push) Successful in 53s
windows / build (x86_64-pc-windows-msvc) (push) Successful in 1m10s
ci / bench (push) Successful in 5m43s
decky / build-publish (push) Successful in 17s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 8s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 9s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 6s
release / apple (push) Successful in 8m10s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 9s
arch / build-publish (push) Successful in 11m59s
android / android (push) Successful in 13m3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 6m39s
docker / deploy-docs (push) Successful in 18s
apple / screenshots (push) Successful in 5m32s
deb / build-publish (push) Successful in 14m54s
ci / rust (push) Successful in 23m19s
rpm / build-publish (43, bazzite, punktfunk-fedora-rpm) (push) Successful in 15m53s
rpm / build-publish (44, fedora-44, punktfunk-fedora44-rpm) (push) Successful in 15m44s
flatpak / build-publish (push) Failing after 35s
Ship the Android client's 3-tier stats-overlay semantics in every other client (design/stats-unification.md vocabulary): Off → Compact (one line: fps · e2e ms · Mb/s + loss flag) → Normal (mode + e2e p50/p95 + loss counters) → Detailed (decoder path, HDR tag, per-stage latency equation). Apple: new StatsVerbosity in PunktfunkKit persisted under punktfunk.statsVerbosity (migrates the legacy hudEnabled bool: explicit off → Off, else Normal). The existing three-finger tap (TouchMouse, trackpad/pointer modes only — touch passthrough untouched) now cycles the tiers instead of toggling, matching Android; ⌃⌥⇧S (menu + captured-state monitor) cycles the same ladder. Tiered StreamHUDView (compact glass pill / headline HUD / full equation HUD); the iOS corner disconnect also shows in Compact (the pill carries no button). Tier pickers on iOS, macOS, tvOS and the gamepad settings UI. Session stack (Linux + Windows + Deck share punktfunk-session): shared pf_client_core::trust::StatsVerbosity; Settings grows stats_verbosity with a show_stats fallback, and writes keep the legacy bool in sync so pre-tier binaries reading the same JSON agree on off vs on. Ctrl+Alt+Shift+S cycles the tier and re-renders the OSD immediately from the last stats window; the stdout stats: line always carries the full Detailed text so the shell status card and scripts keep a stable shape; --stats bumps Off → Normal without demoting a richer tier. Tier pickers in the GTK dialog, the WinUI settings page and the console-UI settings row; shortcut copy updated (GTK shortcuts window, Windows help, session README). The Windows legacy builtin path keeps its bool HUD. Tests: tier migration/round-trip in trust.rs, tiered stats_text output in pf-presenter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
96 lines
7.0 KiB
Swift
96 lines
7.0 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"
|
|
/// Requested audio channel count: 2 (stereo), 6 (5.1) or 8 (7.1). The host clamps to what it
|
|
/// can capture; the resolved count drives the in-core decode + AVAudioEngine layout.
|
|
public static let audioChannels = "punktfunk.audioChannels"
|
|
/// Preferred video codec: `"auto"` (host decides), `"hevc"`, or `"h264"`. A soft preference —
|
|
/// the host emits it when it can, else falls back. Drives the decoder via `Welcome.codec`.
|
|
public static let codec = "punktfunk.codec"
|
|
public static let micEnabled = "punktfunk.micEnabled"
|
|
public static let speakerUID = "punktfunk.speakerUID"
|
|
public static let micUID = "punktfunk.micUID"
|
|
/// macOS: which input channel of the chosen mic device feeds the host. 0 = "Auto" (sum every
|
|
/// channel to mono — a mic on a single input of a multi-channel interface passes at full
|
|
/// level); n≥1 pins 1-based input channel n. Multi-channel interfaces expose the mic on ONE
|
|
/// discrete channel, and the default N→stereo downmix grabs channels 0/1 (silence when the mic
|
|
/// is higher up), so we fold to mono ourselves. Only meaningful for multi-channel devices.
|
|
public static let micChannel = "punktfunk.micChannel"
|
|
public static let presenter = "punktfunk.presenter"
|
|
/// macOS: V-Sync the stream's presents — each decoded frame flips on the next display vsync
|
|
/// (evenly paced, no tearing under direct scanout) instead of as soon as the GPU finishes
|
|
/// (lowest latency — the default, OFF). Resolved once per session;
|
|
/// PUNKTFUNK_PRESENT_MODE=immediate|vsync overrides it for A/B. See Stage2Pipeline's header.
|
|
public static let vsync = "punktfunk.vsync"
|
|
/// Allow variable refresh rate: hand the display link a wide frame-rate RANGE (low floor,
|
|
/// preferred = stream rate) so a ProMotion / adaptive-sync display can vary its physical
|
|
/// refresh to match the stream. On by default; a no-op on fixed-refresh displays. When off,
|
|
/// macOS lets the link free-run at the display's native rate and iOS keeps its proven 30 Hz
|
|
/// floor. Read per session/reconfigure by `SessionPresenter.syncFrameRate`.
|
|
public static let allowVRR = "punktfunk.allowVRR"
|
|
/// Request a 10-bit BT.2020 PQ (HDR10) stream. On by default; only takes effect when the host
|
|
/// has HDR content AND this display supports HDR — otherwise the stream stays 8-bit SDR.
|
|
public static let hdrEnabled = "punktfunk.hdrEnabled"
|
|
/// Request a full-chroma 4:4:4 stream when this device can HARDWARE-decode it (`Stage444Probe`).
|
|
/// On by default; only takes effect when the host also opted in to 4:4:4 (otherwise the stream
|
|
/// stays 4:2:0). Sharper text/UI at the cost of more bandwidth.
|
|
public static let enable444 = "punktfunk.enable444"
|
|
public static let hosts = "punktfunk.hosts"
|
|
/// Client-side cursor mode: "auto" (shown only in gamescope sessions), "always", "never".
|
|
public static let cursorMode = "punktfunk.cursorMode"
|
|
/// iPad: capture the mouse/trackpad pointer (pointer lock → relative movement) for games,
|
|
/// rather than forwarding an absolute cursor position. On by default. Only meaningful on iPad
|
|
/// with a hardware mouse/trackpad; the system grants the lock only to a full-screen, frontmost
|
|
/// scene and silently falls back to the absolute pointer when it can't (Stage Manager / Slide
|
|
/// Over). Read by `StreamViewController.prefersPointerLocked`.
|
|
public static let pointerCapture = "punktfunk.pointerCapture"
|
|
/// iPhone/iPad: how touchscreen fingers drive the host — a `TouchInputMode` raw value:
|
|
/// "trackpad" (default: relative cursor with tap-click / two-finger-scroll gestures),
|
|
/// "pointer" (the cursor jumps to the finger), or "touch" (real multi-touch passthrough).
|
|
/// Read live per gesture by `StreamLayerUIView`.
|
|
public static let touchMode = "punktfunk.touchMode"
|
|
/// 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"
|
|
/// LEGACY (pre-tiered overlay): the old boolean stats-overlay toggle. Kept ONLY as the
|
|
/// migration fallback `StatsVerbosity.current` reads when `statsVerbosity` was never
|
|
/// written (absent-or-true → .normal, explicit false → .off). Never written anymore.
|
|
public static let hudEnabled = "punktfunk.hudEnabled"
|
|
/// The statistics overlay tier — a `StatsVerbosity` raw value ("off"/"compact"/"normal"/
|
|
/// "detailed"). Absent → migrated from the legacy `hudEnabled` bool (see above). Cycle it
|
|
/// while streaming with ⌃⌥⇧S (the cross-client Ctrl+Alt+Shift+S; macOS / hardware
|
|
/// keyboard) or a three-finger tap (touch), matching the Android client.
|
|
public static let statsVerbosity = "punktfunk.statsVerbosity"
|
|
/// Which corner the statistics overlay sits in — a `HUDPlacement` raw value
|
|
/// ("topLeading"/"topTrailing"/"bottomLeading"/"bottomTrailing"). Default top-trailing.
|
|
public static let hudPlacement = "punktfunk.hudPlacement"
|
|
/// iOS/iPadOS/macOS: switch the host list, settings and game library to a controller-friendly
|
|
/// layout (the console launcher, gamepad-navigable settings, a coverflow-style library)
|
|
/// whenever a gamepad is connected. On by default; see `GamepadUIEnvironment.isActive`.
|
|
public static let gamepadUIEnabled = "punktfunk.gamepadUIEnabled"
|
|
}
|
|
|
|
extension Notification.Name {
|
|
/// Posted by the app's Stream menu ("Release Mouse", ⌃⌥⇧Q): the key window's stream view
|
|
/// releases input capture if it holds it. Only reachable while NOT captured (a captured
|
|
/// session swallows the combo in InputCapture's monitor and the frozen cursor can't click
|
|
/// menus) — it exists so the menu item is honest whenever it CAN fire, and as the shortcut's
|
|
/// discoverable menu-bar surface.
|
|
public static let punktfunkReleaseCapture = Notification.Name("io.unom.punktfunk.release-capture")
|
|
}
|