Skip to content

Commit 3d97eb7

Browse files
committed
Improve game detection for stock launcher
1 parent 1c60f04 commit 3d97eb7

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## Unreleased
44

5+
### Fixed
6+
7+
- Improve game detection for stock launcher
8+
59
## 1.1.0
610

711
### Added

GarageBard/Utils/ProcessManager.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,18 @@ class ProcessManager {
2424
app = nil
2525

2626
// Find apps that have a UI
27-
let apps = NSWorkspace.shared.runningApplications.filter { app in
27+
let appsWithUI = NSWorkspace.shared.runningApplications.filter { app in
2828
app.activationPolicy == .regular
2929
}
3030

31-
// Find all wine apps
32-
let wineApps = apps.filter { app in
33-
app.localizedName?.contains("wine") == true
31+
// Find all apps that could be the game
32+
let appsMayBeXIV = appsWithUI.filter { app in
33+
app.localizedName?.contains("wine") == true ||
34+
app.localizedName?.contains("FINAL FANTASY XIV ONLINE") == true
3435
}
3536

3637
// If there's only one, then assume it's the game
37-
if wineApps.count == 1, let xivApp = wineApps.first {
38+
if appsMayBeXIV.count == 1, let xivApp = appsMayBeXIV.first {
3839
app = Application(xivApp)
3940
do {
4041
if let currentApp = app {

0 commit comments

Comments
 (0)