Skip to content

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

Per-game launch args from the db, gated by macOS version (#21)

Gauthier Piarretteb84d53537ee1
diff --git a/Sources/HighballApp/AppState.swift b/Sources/HighballApp/AppState.swift
index 60e58ed..4e3289f 100644
--- a/Sources/HighballApp/AppState.swift
+++ b/Sources/HighballApp/AppState.swift
@@ -484,10 +484,13 @@ final class AppState {
func launchGame(_ game: SteamGame, in bottle: Bottle) {
guard let engine = engine(for: bottle) else { return }
let steam = bottle.driveC.appending(path: "Program Files (x86)/Steam/steam.exe")
- let renderer = gameDB[game.appid]?.renderer
+ let entry = gameDB[game.appid]
+ let renderer = entry?.renderer
+ // Per-game launch args ride the db (e.g. windowed for legacy CS:GO on macOS 26, #21).
+ let extraArgs = entry?.effectiveLaunchArgs() ?? []
runBusy("Running \(game.name)", showLogSheet: false) { [self] in
let runner = WineRunner(paths: paths, engine: engine, bottle: bottle)
- let result = try await runner.start(steam, arguments: ["-silent", "-applaunch", String(game.appid)], renderer: renderer) { line in
+ let result = try await runner.start(steam, arguments: ["-silent", "-applaunch", String(game.appid)] + extraArgs, renderer: renderer) { line in
Task { @MainActor in self.appendLog(line) }
}
if result.crashedEarly {
diff --git a/Sources/HighballKit/SteamLibrary.swift b/Sources/HighballKit/SteamLibrary.swift
index 58b6bfd..2c783ae 100644
--- a/Sources/HighballKit/SteamLibrary.swift
+++ b/Sources/HighballKit/SteamLibrary.swift
@@ -78,8 +78,25 @@ public struct GameDBEntry: Codable, Sendable {
public var provenance: String?
public var notes: String?
public var anticheat: AnticheatInfo?
+ /// Extra arguments appended to the game's launch (Steam forwards -applaunch trailing args
+ /// to the game). Data, not code: game-specific knowledge stays in the db (issue #21's
+ /// windowed workaround for legacy CS:GO's macOS 26 fullscreen freeze is the first user).
+ public var launchArgs: [String]?
+ /// Apply launchArgs only at or above this macOS version ("26.0"). A workaround for one OS
+ /// must not change behaviour for users where the game already works (14.x fullscreen is
+ /// fine); nil means the args apply everywhere.
+ public var launchArgsMinMacOS: String?
public var isBlocked: Bool { status == "blocked-anticheat" }
+
+ /// The launch args that apply on the given OS version. Pure for testability.
+ public func effectiveLaunchArgs(osMajor: Int = ProcessInfo.processInfo.operatingSystemVersion.majorVersion) -> [String] {
+ guard let args = launchArgs else { return [] }
+ if let gate = launchArgsMinMacOS, let want = Int(gate.split(separator: ".").first ?? "") {
+ guard osMajor >= want else { return [] }
+ }
+ return args
+ }
}
public struct GameDB: Sendable {