Remove libstrangle option

This commit is contained in:
Mathieu Comandon 2024-01-31 10:31:45 -08:00
parent abd8d9c5cd
commit 0934b014fe
6 changed files with 7 additions and 28 deletions

View file

@ -3,7 +3,6 @@ import os
import shlex
import stat
from lutris.exceptions import MissingExecutableError
from lutris.util import cache_single, system
from lutris.util.linux import LINUX_SYSTEM
from lutris.util.log import logger
@ -57,15 +56,6 @@ def get_launch_parameters(runner, gameplay_info):
launch_arguments = mango_args + launch_arguments
env.update(mango_env)
# Libstrangle
fps_limit = system_config.get("fps_limit") or ""
if fps_limit:
try:
strangle_cmd = system.find_executable("strangle")
launch_arguments = [strangle_cmd, fps_limit] + launch_arguments
except MissingExecutableError:
logger.warning("libstrangle is not available on this system, FPS limiter disabled")
prefix_command = system_config.get("prefix_command") or ""
if prefix_command:
launch_arguments = shlex.split(os.path.expandvars(prefix_command)) + launch_arguments

View file

@ -113,7 +113,7 @@ def create_prefix( # noqa: C901
runner = import_runner("wine")()
wine_path = runner.get_executable()
logger.info("Winepath: %s", wine_path)
if not 'Proton' in wine_path:
if 'Proton' not in wine_path:
wineboot_path = os.path.join(os.path.dirname(wine_path), "wineboot")
if not system.path_exists(wineboot_path):
logger.error(
@ -138,7 +138,7 @@ def create_prefix( # noqa: C901
wineenv["WINE_SKIP_MONO_INSTALLATION"] = "1"
overrides["mscoree"] = "disabled"
if not 'Proton' in wine_path:
if 'Proton' not in wine_path:
system.execute([wineboot_path], env=wineenv)
for loop_index in range(1000):
time.sleep(0.5)
@ -318,7 +318,7 @@ def wineexec( # noqa: C901
if 'Proton' in wine_path:
# TODO: Determine and insert GAMEID and STORE
wineenv["GAMEID"] = "ulwgl-foo"
wineenv["PROTONPATH"] = os.path.abspath(os.path.join(os.path.dirname(wine_path),"../../"))
wineenv["PROTONPATH"] = os.path.abspath(os.path.join(os.path.dirname(wine_path), "../../"))
baseenv = runner.get_env(disable_runtime=disable_runtime)
baseenv.update(wineenv)
@ -396,7 +396,7 @@ def winetricks(
runner = import_runner("wine")()
winetricks_wine = runner.get_executable()
# We only need to perform winetricks if not using ulwgl/proton. ulwgl uses protonfixes
if not 'Proton' in wine_path:
if 'Proton' not in wine_path:
if arch not in ("win32", "win64"):
arch = detect_arch(prefix, winetricks_wine)
args = app

View file

@ -1088,7 +1088,7 @@ class wine(Runner):
# Proton support
if wine_config_version and "Proton" in wine_config_version and "lutris" not in wine_config_version:
if not ("GAMEID" in env):
if "GAMEID" not in env:
env["GAMEID"] = "ULWGL-foo"
env["PROTONPATH"] = wine_exe[:wine_exe.index("files/bin")]
return env

View file

@ -315,16 +315,6 @@ system_options = [ # pylint: disable=invalid-name
"Requires the screen saver's functionality "
"to be exposed over DBus."),
},
{
"section": _("Display"),
"option": "fps_limit",
"type": "string",
"size": "small",
"label": _("FPS limit"),
"condition": system.can_find_executable("strangle"),
"help": _("Limit the game's FPS using libstrangle"),
},
{
"section": _("Display"),
"option": "sdl_video_fullscreen",

View file

@ -41,7 +41,6 @@ SYSTEM_COMPONENTS = {
"lsi-steam",
"Xephyr",
"nvidia-smi",
"strangle",
"xgamma",
],
"TERMINALS": [

View file

@ -14,8 +14,8 @@ for filename in os.listdir(CONFIG_DIR):
extra_configs = config_files - config_paths
for extra in extra_configs:
print(os.unlink(os.path.join(CONFIG_DIR, extra)))
os.unlink(os.path.join(CONFIG_DIR, extra))
print("Lutris configs:", len(config_paths))
print("Config files:", len(config_files))
print(len(extra_configs))
print(len(extra_configs))