Restore the download of new Wine versions during game install.

This commit is contained in:
Daniel Johnson 2023-06-27 19:05:52 -04:00
parent 324f448e2b
commit aba1f07cb1

View file

@ -673,7 +673,7 @@ class wine(Runner):
def get_runner_version(self, version=None, lutris_only=False):
if not version:
version = self.get_version()
version = self.get_version(use_default=False)
if version and not lutris_only and version in WINE_PATHS:
return {"version": version}
@ -683,7 +683,11 @@ class wine(Runner):
def get_version(self, use_default=True):
"""Return the Wine version to use. use_default can be set to false to
force the installation of a specific wine version"""
runner_version = self.runner_config.get("version")
# We must use the raw config to avoid getting a default if the setting is not
# set; we'll fall back to get_default_version() or None rather.
cfg = self.config
runner_version = cfg.raw_runner_config.get("version") or cfg.raw_game_config.get("version")
if runner_version:
return runner_version
if use_default: