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
@@ -66,7 +81,14 @@ public struct SkinCatalogBrowserView: View {
66
81
///
67
82
/// When `preselectedSystem` is non-nil the filter bar is shown automatically
68
83
/// so the user immediately sees which system is active and can change it.
69
-
publicinit(preselectedSystem:String?=nil){
84
+
/// Pass `activationContextSystemIdentifier` / `activationContextGameId` when presenting from gameplay so “Set as active skin” updates the running session.
/// When set, activation writes **game** scope so per-game prefs override any prior selection (system-only writes were ignored by the effective-skin chain).
28
+
privateletactivationContextGameId:String?
25
29
26
30
// MARK: - State
27
31
@@ -52,6 +56,18 @@ public struct SkinCatalogDetailView: View {
/// Order matters: prefer runtime context first, then catalog-derived id, so `DeltaSkinManager.skins(for:)` finds the install under the emulator’s system when they differ.
ELOG("activateSkin: skin '\(entry.name)' (id: \(entry.id)) not found. Available: \(skins.map{"\($0.name) (\($0.identifier))"})")
773
+
guardlet skin = matchedSkin else{
774
+
ELOG("activateSkin: skin '\(entry.name)' (id: \(entry.id)) not found after querying systems: \(querySystems.map(\.rawValue))")
733
775
throwNSError(domain:"SkinCatalog", code:1, userInfo:[NSLocalizedDescriptionKey:"Skin '\(entry.name)' not found after install. Try going back and re-entering."])
734
776
}
735
777
778
+
// Must match EmulatorWithSkinView.systemId so selectionChangedNotification triggers a reload.
779
+
letprefSystem= activationContextSystemIdentifier ?? primarySystemIdentifier ?? system
// Linked PVSystem is authoritative; fall back to persisted PVGame.systemIdentifier when the relationship is missing so skin reload notifications still match.
0 commit comments