8c6c9705f4
Stream reliability - Default to the stage-2 presenter (VTDecompressionSession + CAMetalLayer): it detects and recovers a wedged decoder, where stage-1's AVSampleBufferDisplayLayer freezes hard on a lost HEVC reference frame with no app-side recovery (confirmed Apple limitation). Stage 1 is now a DEBUG-only presenter toggle, plus the automatic no-Metal fallback. - Stage-2 pixel-perfect: render the drawable at the decoded size (shader stays 1:1 = identity) and let the layer's contentsGravity scale via the system compositor — the same path stage-1's videoGravity used — instead of scaling in-shader. - Loss recovery in both pumps is now a persistent awaitingIDR want, retried until an IDR actually lands, so a keyframe request swallowed by the throttle can't strand a frozen frame; 100 ms keyframe throttle to match the Android path. - Fix "Publishing changes from within view updates": defer the HostStore writes out of the .onChange(of: model.phase) callback. - Move AVAudioSession setActive/setCategory off the main thread (async on a shared serial queue) to stop the UI-stall warning. Controllers - Rumble: capped-exponential backoff when the gamecontrollerd.haptics XPC breaks (-4811) so a transient server interruption self-heals instead of cascading; playsHapticsOnly so a controller engine doesn't join the always-active streaming audio session. - Host cards: iPad pointer "magnet" hover effect; iPhone press scale + light haptic. UI / design - Ship Geist (SIL OFL 1.1) as the app font (bundled OTFs + registration), with the license surfaced in Acknowledgements. - Restructure iOS/iPadOS Settings into a category NavigationSplitView; resolution wheel with custom-resolution entry; 10-bit HDR toggle in Display. - Industrial host-card redesign (left-aligned, bold, brand monogram tiles). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
88 lines
3.7 KiB
Swift
88 lines
3.7 KiB
Swift
import PunktfunkKit
|
|
import SwiftUI
|
|
|
|
/// Open-source acknowledgements: punktfunk's own license (MIT OR Apache-2.0) followed by the
|
|
/// third-party software notices. Used as a pushed view on iOS/tvOS and a preferences tab on macOS.
|
|
struct AcknowledgementsView: View {
|
|
private var version: String? {
|
|
Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
|
|
}
|
|
|
|
var body: some View {
|
|
ScrollView {
|
|
// Top-level LazyVStack so the third-party-notices chunks (Licenses.thirdPartyNoticesChunks,
|
|
// ~885 KB total) load lazily as they scroll into view — a single Text that large overshoots
|
|
// the text-rendering height limit (blank below the limit + very slow). spacing 0 keeps the
|
|
// notice chunks visually continuous; the header block carries its own spacing + bottom pad.
|
|
LazyVStack(alignment: .leading, spacing: 0) {
|
|
VStack(alignment: .leading, spacing: 18) {
|
|
Text("punktfunk")
|
|
.font(.geist(22, .bold, relativeTo: .title2))
|
|
if let version {
|
|
Text("Version \(version)")
|
|
.font(.geist(12, relativeTo: .caption))
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
Text(Licenses.appLicense)
|
|
.font(.caption.monospaced())
|
|
.modifier(SelectableText())
|
|
|
|
Divider()
|
|
|
|
Text("Bundled font")
|
|
.font(.geist(17, .semibold, relativeTo: .headline))
|
|
Text("punktfunk ships the Geist typeface (Geist Sans), "
|
|
+ "© The Geist Project Authors / Vercel, used under the SIL Open Font "
|
|
+ "License 1.1.")
|
|
.font(.geist(12, relativeTo: .caption))
|
|
.foregroundStyle(.secondary)
|
|
if !Licenses.fontLicense.isEmpty {
|
|
Text(Licenses.fontLicense)
|
|
.font(.caption2.monospaced())
|
|
.modifier(SelectableText())
|
|
}
|
|
|
|
Divider()
|
|
|
|
Text("Third-party software")
|
|
.font(.geist(17, .semibold, relativeTo: .headline))
|
|
Text(
|
|
"punktfunk uses the open-source components below, each under its own license. "
|
|
+ "On some platforms FFmpeg is additionally bundled under the LGPL v2.1+ "
|
|
+ "(dynamically linked, replaceable)."
|
|
)
|
|
.font(.geist(12, relativeTo: .caption))
|
|
.foregroundStyle(.secondary)
|
|
}
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding(.bottom, 18)
|
|
|
|
ForEach(Licenses.thirdPartyNoticesChunks.indices, id: \.self) { i in
|
|
Text(Licenses.thirdPartyNoticesChunks[i])
|
|
.font(.caption2.monospaced())
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.modifier(SelectableText())
|
|
}
|
|
}
|
|
.frame(maxWidth: 900, alignment: .leading)
|
|
.frame(maxWidth: .infinity, alignment: .leading)
|
|
.padding()
|
|
#if os(tvOS)
|
|
.padding(40)
|
|
#endif
|
|
}
|
|
.navigationTitle("Acknowledgements")
|
|
}
|
|
}
|
|
|
|
/// `textSelection(.enabled)` is unavailable on tvOS, so apply it only where it exists.
|
|
private struct SelectableText: ViewModifier {
|
|
func body(content: Content) -> some View {
|
|
#if os(tvOS)
|
|
content
|
|
#else
|
|
content.textSelection(.enabled)
|
|
#endif
|
|
}
|
|
}
|