Skip to content

Commit d17cdcf

Browse files
committed
Game Controllers panel for prefixes
1 parent 984ebbc commit d17cdcf

2 files changed

Lines changed: 38 additions & 1 deletion

File tree

‎app/Sources/NotProtonApp/Model/PrefixTools.swift‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,21 @@ enum WineTool: String, CaseIterable, Sendable {
99
case winecfg
1010
case regedit
1111
case taskmgr
12+
case joycpl
1213

1314
var label: String {
1415
switch self {
1516
case .winecfg: String(localized: "Wine Configuration")
1617
case .regedit: String(localized: "Registry Editor")
1718
case .taskmgr: String(localized: "Task Manager")
19+
case .joycpl: String(localized: "Game Controllers")
20+
}
21+
}
22+
23+
func arguments(runner: URL) -> [String] {
24+
switch self {
25+
case .joycpl: [runner.appending(path: "lib/wine/x86_64-windows/control.exe").path(percentEncoded: false), "joy.cpl"]
26+
default: [rawValue]
1827
}
1928
}
2029
}
@@ -216,7 +225,7 @@ enum PrefixTools {
216225
let loader = try readyLoader(step: step, prefix: prefix, runner: runner, flavor: flavor)
217226
try Shell.detach(
218227
loader.path(percentEncoded: false),
219-
[tool.rawValue],
228+
tool.arguments(runner: runner),
220229
environment: environment(prefix: prefix, runner: runner, flavor: flavor)
221230
)
222231
}

‎app/Sources/NotProtonApp/Resources/Localization/Localizable.xcstrings‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5167,6 +5167,34 @@
51675167
}
51685168
}
51695169
},
5170+
"Game Controllers" : {
5171+
"localizations" : {
5172+
"de" : {
5173+
"stringUnit" : {
5174+
"state" : "new",
5175+
"value" : "Game Controllers"
5176+
}
5177+
},
5178+
"fr" : {
5179+
"stringUnit" : {
5180+
"state" : "new",
5181+
"value" : "Game Controllers"
5182+
}
5183+
},
5184+
"it" : {
5185+
"stringUnit" : {
5186+
"state" : "new",
5187+
"value" : "Game Controllers"
5188+
}
5189+
},
5190+
"zh-Hans" : {
5191+
"stringUnit" : {
5192+
"state" : "new",
5193+
"value" : "Game Controllers"
5194+
}
5195+
}
5196+
}
5197+
},
51705198
"General" : {
51715199
"localizations" : {
51725200
"de" : {

0 commit comments

Comments
 (0)