Skip to content

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

Settings stays dark; Continue playing only once the grid needs it

Gauthier Piarrettec8e47e2c40c8
diff --git a/Sources/HighballApp/HighballApp.swift b/Sources/HighballApp/HighballApp.swift
index 5cd52e6..12b04ae 100644
--- a/Sources/HighballApp/HighballApp.swift
+++ b/Sources/HighballApp/HighballApp.swift
@@ -9,7 +9,7 @@ struct HighballApp: App {
@State private var state = AppState()
var body: some Scene {
- Settings { SettingsView().environment(state) }
+ Settings { SettingsView().environment(state).preferredColorScheme(.dark) }
WindowGroup("Highball") {
ContentView()
.environment(state)
diff --git a/Sources/HighballApp/LibraryView.swift b/Sources/HighballApp/LibraryView.swift
index e35b884..59b93fb 100644
--- a/Sources/HighballApp/LibraryView.swift
+++ b/Sources/HighballApp/LibraryView.swift
@@ -29,8 +29,10 @@ struct LibraryView: View {
}
}
+ /// Only once the grid needs it: with a handful of games the row would repeat every tile.
private var continueItems: [LibraryItem] {
- state.libraryItems
+ guard state.libraryItems.count > 6 else { return [] }
+ return state.libraryItems
.filter { $0.lastPlayed != nil && $0.installed }
.sorted { ($0.lastPlayed ?? .distantPast) > ($1.lastPlayed ?? .distantPast) }
.prefix(10).map { $0 }