Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

287 B
Raw Blame
import Foundation

// Whether a restart would land under a running game. pgrep can take seconds, so it stays off
// the main actor.
enum RestartGuard {
    static func gameRunning() async -> Bool {
        await Task.detached(priority: .utility) { WineServer.isRunning() }.value
    }
}