Simplify MangoHUD option

This commit is contained in:
Mathieu Comandon 2022-04-11 17:26:47 -07:00
parent 09371fe553
commit 50cdc65e77
2 changed files with 5 additions and 16 deletions

View file

@ -10,14 +10,9 @@ from lutris.util.log import logger
def get_mangohud_conf(system_config):
"""Return correct launch arguments and environment variables for Mangohud."""
mango_args = []
mangohud = system_config.get("mangohud") or ""
if mangohud and system.find_executable("mangohud"):
if mangohud == "gl32":
mango_args = ["mangohud.x86"]
else:
mango_args = ["mangohud"]
return mango_args, {"MANGOHUD": "1", "MANGOHUD_DLSYM": "1"}
if system_config.get("mangohud") and system.find_executable("mangohud"):
return ["mangohud"], {"MANGOHUD": "1", "MANGOHUD_DLSYM": "1"}
return None, None
def get_launch_parameters(runner, gameplay_info):

View file

@ -306,15 +306,9 @@ system_options = [ # pylint: disable=invalid-name
},
{
"option": "mangohud",
"type": "choice",
"type": "bool",
"label": _("FPS counter (MangoHud)"),
"choices": (
(_("Disabled"), ""),
(_("Enabled"), "on"),
(_("Enabled (32bit)"), "gl32")
),
"default": "",
"advanced": False,
"default": False,
"condition": bool(system.find_executable("mangohud")),
"help": _("Display the game's FPS + other information. Requires MangoHud to be installed."),
},