Remove unneeded variable from constant

This commit is contained in:
Mathieu Comandon 2023-06-14 12:37:55 -07:00
parent c724b70e64
commit e1221288d9

View file

@ -54,26 +54,25 @@ def _get_dxvk_version_warning(config):
if config.get("dxvk") and vkquery.is_vulkan_supported():
version = config.get("dxvk_version")
if version and not version.startswith("v1."):
required_api_version = REQUIRED_VULKAN_API_VERSION
library_api_version = vkquery.get_vulkan_api_version()
if library_api_version and library_api_version < required_api_version:
if library_api_version and library_api_version < REQUIRED_VULKAN_API_VERSION:
return _("<b>Warning</b> Lutris has detected that Vulkan API version %s is installed, "
"but to use the latest DXVK version, %s is required."
) % (
vkquery.format_version(library_api_version),
vkquery.format_version(required_api_version)
vkquery.format_version(REQUIRED_VULKAN_API_VERSION)
)
devices = vkquery.get_device_info()
if devices and devices[0].api_version < required_api_version:
if devices and devices[0].api_version < REQUIRED_VULKAN_API_VERSION:
return _(
"<b>Warning</b> Lutris has detected that the best device available ('%s') supports Vulkan API %s, "
"but to use the latest DXVK version, %s is required."
) % (
devices[0].name,
vkquery.format_version(devices[0].api_version),
vkquery.format_version(required_api_version)
vkquery.format_version(REQUIRED_VULKAN_API_VERSION)
)
return None