1c04e77293
apple / screenshots (push) Has been cancelled
apple / swift (push) Has been cancelled
ci / docs-site (push) Has been cancelled
ci / bench (push) Has been cancelled
ci / web (push) Has been cancelled
ci / rust (push) Has been cancelled
android-screenshots / screenshots (push) Successful in 2m16s
deb / build-publish (push) Successful in 3m26s
decky / build-publish (push) Successful in 13s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 6s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
windows-host / package (push) Successful in 6m48s
release / apple (push) Successful in 7m45s
windows-msix / package (arm64, C:\Users\Public\ffmpeg-arm64, aarch64-pc-windows-msvc, C:\t-a64) (push) Successful in 1m22s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 2m37s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
android / android (push) Successful in 9m35s
windows-msix / package (x64, C:\Users\Public\ffmpeg, x86_64-pc-windows-msvc, C:\t) (push) Successful in 1m32s
linux-client-screenshots / screenshots (push) Successful in 2m31s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m53s
web-screenshots / screenshots (push) Successful in 2m32s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m37s
flatpak / build-publish (push) Failing after 3m47s
docker / deploy-docs (push) Failing after 1m9s
feat(apple): add cursor capture on iPad
52 lines
3.5 KiB
Swift
52 lines
3.5 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"
|
|
public static let micEnabled = "punktfunk.micEnabled"
|
|
public static let speakerUID = "punktfunk.speakerUID"
|
|
public static let micUID = "punktfunk.micUID"
|
|
public static let presenter = "punktfunk.presenter"
|
|
/// 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"
|
|
/// 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"
|
|
}
|