Skip to content

Commit 713faaf

Browse files
authored
Allow for specifying wrappers in the env var section again (Heroic-Games-Launcher#1358)
1 parent f10051f commit 713faaf

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

electron/launcher.ts

+18-6
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,15 @@ function setupWineEnvVars(gameSettings: GameSettings) {
247247
ret.VKD3D_CONFIG = 'upload_hvv'
248248
}
249249
if (gameSettings.otherOptions) {
250-
gameSettings.otherOptions.split(' ').forEach((envKeyAndVar) => {
251-
const keyAndValueSplit = envKeyAndVar.split('=')
252-
const key = keyAndValueSplit.shift()
253-
const value = keyAndValueSplit.join('=')
254-
ret[key] = value
255-
})
250+
gameSettings.otherOptions
251+
.split(' ')
252+
.filter((val) => val.indexOf('=') !== -1)
253+
.forEach((envKeyAndVar) => {
254+
const keyAndValueSplit = envKeyAndVar.split('=')
255+
const key = keyAndValueSplit.shift()
256+
const value = keyAndValueSplit.join('=')
257+
ret[key] = value
258+
})
256259
}
257260
return ret
258261
}
@@ -264,6 +267,15 @@ function setupWrappers(
264267
steamRuntime: string
265268
): Array<string> {
266269
const wrappers = Array<string>()
270+
// Wrappers could be specified in the environment variable section as well
271+
if (gameSettings.otherOptions) {
272+
gameSettings.otherOptions
273+
.split(' ')
274+
.filter((val) => val.indexOf('=') === -1)
275+
.forEach((val) => {
276+
wrappers.push(val)
277+
})
278+
}
267279
if (gameSettings.showMangohud) {
268280
// Mangohud needs some arguments in addition to the command, so we have to split here
269281
wrappers.push(...mangoHudBin.split(' '))

0 commit comments

Comments
 (0)