Skip to content

Run Windows games on Apple Silicon — free, open source, with an open compatibility database that tells you what actually works.

The Steam cloud saves row says nothing for a game no environment's Steam has listed, rather than that it keeps its saves on this Mac.

Gabe484537aea2fe
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swift
index 18a1ea5..fd342a3 100644
--- a/Sources/HighballApp/AppState.swift
+++ b/Sources/HighballApp/AppState.swift
@@ -893,7 +893,7 @@ final class AppState {
self.noteNewSteamGames(owned.mapValues { Set($0.map(\.appid)) }, signedIn: signedIn)
guard owned != self.steamOwnedByBottle else { return }
self.steamOwnedByBottle = owned
- self.steamCloudAppIDs = Set(owned.values.joined().filter(\.steamCloud).map(\.appid))
+ self.steamCloudByAppID = Dictionary(owned.values.joined().map { ($0.appid, $0.steamCloud) }, uniquingKeysWith: { a, b in a || b })
self.macAppInfoByAppID = Dictionary(owned.values.joined().map { ($0.appid, $0.macBuild) },
uniquingKeysWith: { a, _ in a })
self.rebuildLibrary()
@@ -3888,8 +3888,9 @@ final class AppState {
}
}
- /// Steam games Steam Cloud keeps saves for (OwnedSteamGame.steamCloud).
- var steamCloudAppIDs: Set<Int> = []
+ /// Whether Steam Cloud keeps each owned Steam game's saves (OwnedSteamGame.steamCloud), for the
+ /// games an environment's Steam has listed; a game not here is one Highball cannot say about.
+ var steamCloudByAppID: [Int: Bool] = [:]
/// How GOG syncs each GOG game's saves (GOGSaves.CloudSetup), asked once a session per game.
@ObservationIgnored private var gogCloudSetups: [String: GOGSaves.CloudSetup] = [:]
diff --git a/Sources/HighballApp/GameDetailView.swift b/Sources/HighballApp/GameDetailView.swift
index ca20592..fd4909a 100644
--- a/Sources/HighballApp/GameDetailView.swift
+++ b/Sources/HighballApp/GameDetailView.swift
@@ -318,7 +318,7 @@ struct GameDetailView: View {
if hasMacVersion {
row(L("Size (Mac)"), macSize)
}
- if item.source == .steam || item.source == .epic || (item.source == .gog && item.installedAnywhere) { cloudSavesRow }
+ if item.source == .steam || item.source == .epic || (item.source == .gog && item.installedAnywhere), !cloudSaveLines.isEmpty { cloudSavesRow }
if let saves = sizes?.saves {
row(item.source == .steam ? L("Steam Cloud saves") : L("Saves"), Self.bytes(saves))
}
@@ -487,9 +487,11 @@ struct GameDetailView: View {
private var cloudSaveLines: [String] {
switch item.source {
case .steam:
- return [item.steamAppID.map(state.steamCloudAppIDs.contains) == true
- ? L("Steam syncs this game's saves with Steam Cloud, for whichever account plays it.")
- : L("This game keeps its saves on this Mac.")]
+ // Nothing until an environment's Steam has listed the game: a Steam for Mac game, or
+ // the moment before the owned refresh lands, is one Highball cannot say about.
+ guard let cloud = item.steamAppID.flatMap({ state.steamCloudByAppID[$0] }) else { return [] }
+ return [cloud ? L("Steam syncs this game's saves with Steam Cloud, for whichever account plays it.")
+ : L("This game keeps its saves on this Mac.")]
case .epic:
return [state.epicOwned.first { $0.app_name == item.epicAppName }?.cloudSaves == true
? L("Epic's cloud keeps this game's saves when Epic's own launcher plays it. Played from Highball, they stay on this Mac.")