Skip to content

Commit b3e38e1

Browse files
committed
Update game running check with new executable names
1 parent 5b559d6 commit b3e38e1

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

backend/ficsitcli/wrapper.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package ficsitcli
33
import (
44
"fmt"
55
"log/slog"
6+
"slices"
67
"sync"
78
"time"
89

@@ -45,6 +46,8 @@ func Init() error {
4546
return nil
4647
}
4748

49+
var executableNames = []string{"FactoryGame-Win64-Shipping.exe", "FactoryGame-Win64-Shipping", "FactoryGameSteam-Win64-Shipping", "FactoryGameEGS-Win64-Shipping"}
50+
4851
func (f *ficsitCLI) StartGameRunningWatcher() {
4952
gameRunningTicker := time.NewTicker(5 * time.Second)
5053
go func() {
@@ -56,7 +59,7 @@ func (f *ficsitCLI) StartGameRunningWatcher() {
5659
}
5760
f.isGameRunning = false
5861
for _, process := range processes {
59-
if process.Executable() == "FactoryGame-Win64-Shipping.exe" || process.Executable() == "FactoryGame-Win64-Shipping" {
62+
if slices.Contains(executableNames, process.Executable()) {
6063
f.isGameRunning = true
6164
break
6265
}

backend/installfinders/common/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package common
33
type GameBranch string
44

55
var (
6+
// TODO rename to BranchRelease later https://github.com/satisfactorymodding/SatisfactoryModManager/pull/223#issuecomment-2342831142
67
BranchEarlyAccess GameBranch = "Early Access"
78
BranchExperimental GameBranch = "Experimental"
89
)

cspell.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"Unignore",
2727
"urql",
2828
"wailsjs",
29-
"wailsjsdir"
29+
"wailsjsdir",
30+
"xsync"
3031
],
3132
// flagWords - list of words to be always considered incorrect
3233
// This is useful for offensive words and common spelling errors.

0 commit comments

Comments
 (0)