From 134ec0330509c2e995dcdd8c967460ecf6f63aee Mon Sep 17 00:00:00 2001 From: Leigh MacDonald Date: Fri, 19 Apr 2024 19:33:06 -0600 Subject: [PATCH] Update launch interface --- platform/platform.go | 2 +- process_state.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform.go b/platform/platform.go index eea9b65..586bfa7 100644 --- a/platform/platform.go +++ b/platform/platform.go @@ -25,7 +25,7 @@ var ( type Platform interface { DefaultSteamRoot() string DefaultTF2Root() string - LaunchTF2(steamRoot string, args []string) error + LaunchTF2(steamRoot string, args ...string) error OpenFolder(dir string) error IsGameRunning() (bool, error) Icon() []byte diff --git a/process_state.go b/process_state.go index 72c3ada..60b057b 100644 --- a/process_state.go +++ b/process_state.go @@ -65,7 +65,7 @@ func (p *processState) launchGame(settingsMgr *settingsManager) { // } // } - if errLaunch := p.platform.LaunchTF2(settings.TF2Dir, args); errLaunch != nil { + if errLaunch := p.platform.LaunchTF2(settings.TF2Dir, args...); errLaunch != nil { slog.Error("Failed to launch game", errAttr(errLaunch)) } else { p.gameHasStartedOnce.Store(true)