def play(self): # pylint: disable=too-many-return-statements # noqa: C901 game_exe = self.game_exe arguments = self.game_config.get("args", "") launch_info = {"env": self.get_env(os_env=False)} using_dxvk = self.runner_config.get("dxvk") if using_dxvk: # Set this to 1 to enable access to more RAM for 32bit applications launch_info["env"]["WINE_LARGE_ADDRESS_AWARE"] = "1" if not is_vulkan_supported(): if not display_vulkan_error(True): return {"error": "VULKAN_NOT_FOUND"} if not system.path_exists(game_exe): return {"error": "FILE_NOT_FOUND", "file": game_exe} if launch_info["env"].get("WINEESYNC") == "1": limit_set = is_esync_limit_set() wine_ver = is_version_esync(self.get_executable()) if not limit_set and not wine_ver: esync_display_version_warning(True) esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not is_esync_limit_set(): esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not wine_ver: if not esync_display_version_warning(True): return {"error": "NON_ESYNC_WINE_VERSION"} if launch_info["env"].get("WINEFSYNC") == "1": fsync_supported = is_fsync_supported() wine_ver = is_version_fsync(self.get_executable()) if not fsync_supported and not wine_ver: fsync_display_version_warning(True) fsync_display_support_warning() return {"error": "FSYNC_NOT_SUPPORTED"} if not fsync_supported: fsync_display_support_warning() return {"error": "FSYNC_NOT_SUPPORTED"} if not wine_ver: if not fsync_display_version_warning(True): return {"error": "NON_FSYNC_WINE_VERSION"} command = [self.get_executable()] game_exe, args, _working_dir = get_real_executable( game_exe, self.working_dir) command.append(game_exe) if args: command = command + args if arguments: for arg in split_arguments(arguments): command.append(arg) launch_info["command"] = command return launch_info
def esync_limit_callback(widget, option, config): limits_set = is_esync_limit_set() wine_path = self.get_path_for_version(config["version"]) wine_ver = is_version_esync(wine_path) if not wine_ver: response = thread_safe_call(esync_display_version_warning) if not limits_set: thread_safe_call(esync_display_limit_warning) response = False return widget, option, response
def esync_limit_callback(widget, option, config): limits_set = is_esync_limit_set() wine_path = self.get_path_for_version(config["version"]) wine_ver = is_version_esync(wine_path) response = True if not wine_ver: response = thread_safe_call(esync_display_version_warning) if not limits_set: thread_safe_call(esync_display_limit_warning) response = False return widget, option, response
def play(self): game_exe = self.game_exe arguments = self.game_config.get("args", "") using_dxvk = self.runner_config.get("dxvk") if using_dxvk: if not is_vulkan_supported(): if not display_vulkan_error(True): return {"error": "VULKAN_NOT_FOUND"} if not system.path_exists(game_exe): return {"error": "FILE_NOT_FOUND", "file": game_exe} launch_info = {"env": self.get_env(os_env=False)} if launch_info["env"].get("WINEESYNC") == "1": limit_set = is_esync_limit_set() wine_ver = is_version_esync(self.get_executable()) if not limit_set and not wine_ver: esync_display_version_warning(True) esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not is_esync_limit_set(): esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not wine_ver: if not esync_display_version_warning(True): return {"error": "NON_ESYNC_WINE_VERSION"} command = [self.get_executable()] game_exe, args, _working_dir = get_real_executable( game_exe, self.working_dir) command.append(game_exe) if args: command = command + args if arguments: for arg in shlex.split(arguments): command.append(arg) launch_info["command"] = command return launch_info
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(wine_path) if not limits_set and not wine_ver: esync_display_version_warning(False) esync_display_limit_warning() return False if not limits_set: esync_display_limit_warning() return False if not wine_ver: if not esync_display_version_warning(False): return False return True
def play(self): game_exe = self.game_exe arguments = self.game_config.get("args", "") using_dxvk = self.runner_config.get("dxvk") or self.runner_config.get("d9vk") if using_dxvk: if not is_vulkan_supported(): if not display_vulkan_error(True): return {"error": "VULKAN_NOT_FOUND"} if not system.path_exists(game_exe): return {"error": "FILE_NOT_FOUND", "file": game_exe} launch_info = {"env": self.get_env(os_env=False)} if launch_info["env"].get("WINEESYNC") == "1": limit_set = is_esync_limit_set() wine_ver = is_version_esync(self.get_executable()) if not limit_set and not wine_ver: esync_display_version_warning(True) esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not is_esync_limit_set(): esync_display_limit_warning() return {"error": "ESYNC_LIMIT_NOT_SET"} if not wine_ver: if not esync_display_version_warning(True): return {"error": "NON_ESYNC_WINE_VERSION"} command = [self.get_executable()] game_exe, args, _working_dir = get_real_executable(game_exe, self.working_dir) command.append(game_exe) if args: command = command + args if arguments: for arg in shlex.split(arguments): command.append(arg) launch_info["command"] = command return launch_info