mirror of
https://github.com/lutris/lutris
synced 2024-09-15 22:09:55 +00:00
util/wine.py: Change call to subprocess.check_output and remove redundant parameter.
This commit is contained in:
parent
f88af970da
commit
603ecc604a
|
@ -161,7 +161,7 @@ class wine(Runner):
|
|||
def esync_limit_callback(config):
|
||||
limits_set = is_esync_limit_set()
|
||||
wine_path = self.get_path_for_version(config['version'])
|
||||
wine_ver = is_version_esync(config['version'], wine_path)
|
||||
wine_ver = is_version_esync(wine_path)
|
||||
|
||||
if not limits_set and not wine_ver:
|
||||
esync_display_version_warning(False)
|
||||
|
@ -743,7 +743,7 @@ class wine(Runner):
|
|||
|
||||
if 'WINEESYNC' in launch_info['env'].get('WINEESYNC') == "1":
|
||||
limit_set = is_esync_limit_set()
|
||||
wine_ver = is_version_esync(self.runner_config['version'], self.get_executable())
|
||||
wine_ver = is_version_esync(self.get_executable())
|
||||
|
||||
if not limit_set and not wine_ver:
|
||||
esync_display_version_warning(True)
|
||||
|
|
|
@ -201,24 +201,20 @@ def support_legacy_version(version):
|
|||
return version
|
||||
|
||||
|
||||
def is_version_esync(version, path):
|
||||
"""Determines is a Wine build has both build and path, I have no fucking
|
||||
clue why both version and path are given to this function, seems redundant.
|
||||
def is_version_esync(path):
|
||||
"""Determines if a Wine build is Esync capable
|
||||
|
||||
Params:
|
||||
version: The Wine version name
|
||||
path: the path to the Wine version name (WHYYYYYYYY???????)
|
||||
|
||||
path: the path to the Wine version
|
||||
|
||||
Returns:
|
||||
bool: True is the build is Esync capable
|
||||
"""
|
||||
version = version.lower()
|
||||
version = path.lower()
|
||||
if 'esync' in version or 'proton' in version:
|
||||
return True
|
||||
|
||||
command = path + " --version"
|
||||
wine_ver = str(subprocess.Popen(command, shell=True, stdout=subprocess.PIPE).stdout.read())
|
||||
wine_ver = str(subprocess.check_output([path, "--version"]))
|
||||
return 'esync' in wine_ver.lower()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue