Skip to content

[FIX] Allow mangohud to find its config file again #2841

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
18 changes: 18 additions & 0 deletions src/backend/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,24 @@ function setupWineEnvVars(gameSettings: GameSettings, gameId = '0') {
ret.WINE_FULLSCREEN_FSR_STRENGTH =
gameSettings.maxSharpness?.toString() || '2'
}
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