Skip to content

Commit

Permalink
[FIX] Allow mangohud to find its config file again (#2841)
Browse files Browse the repository at this point in the history
* fix mangohud config file

* use heroic process XDG_CONFIG_HOME

* Update launcher.ts

* Update launcher.ts

* Update launcher.ts

* remove .toLowerCase

* Update launcher.ts
  • Loading branch information
Etaash-mathamsetty committed Jul 14, 2023
1 parent efe1191 commit 0d22770
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion src/backend/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -311,13 +311,30 @@ function setupWineEnvVars(gameSettings: GameSettings, gameId = '0') {
case 'crossover':
ret.CX_BOTTLE = wineCrossoverBottle
}

if (gameSettings.showFps) {
isMac ? (ret.MTL_HUD_ENABLED = '1') : (ret.DXVK_HUD = 'fps')
}
if (gameSettings.enableDXVKFpsLimit) {
ret.DXVK_FRAME_RATE = gameSettings.DXVKFpsCap
}
if (
gameSettings.showMangohud &&
!gameSettings.enviromentOptions.find(
({ key }) => key === 'MANGOHUD_CONFIGFILE'
)
) {
if (!process.env.XDG_CONFIG_HOME) {
ret.MANGOHUD_CONFIGFILE = join(
flatPakHome,
'.config/MangoHud/MangoHud.conf'
)
} else {
ret.MANGOHUD_CONFIGFILE = join(
process.env.XDG_CONFIG_HOME,
'MangoHud/MangoHud.conf'
)
}
}
if (gameSettings.enableEsync && wineVersion.type !== 'proton') {
ret.WINEESYNC = '1'
}
Expand Down

0 comments on commit 0d22770

Please sign in to comment.