def launch(self): """Request launching a game. The game may not be installed yet.""" if not self.is_installed: raise RuntimeError("Tried to launch a game that isn't installed") self.load_config() # Reload the config before launching it. if str(self.id) in LOG_BUFFERS: # Reset game logs on each launch LOG_BUFFERS.pop(str(self.id)) if not self.runner: dialogs.ErrorDialog(_("Invalid game configuration: Missing runner")) return if not self.is_launchable(): logger.error("Game is not launchable") return self.state = self.STATE_LAUNCHING self.prelaunch_pids = system.get_running_pid_list() self.emit("game-start") jobs.AsyncCall(self.runner.prelaunch, self.configure_game)
def launch(self): """Request launching a game. The game may not be installed yet.""" if not self.is_installed: self.emit("game-install") return self.load_config() # Reload the config before launching it. if self.id in LOG_BUFFERS: # Reset game logs on each launch LOG_BUFFERS.pop(self.id) if not self.runner: dialogs.ErrorDialog(_("Invalid game configuration: Missing runner")) return if not self.is_launchable(): logger.error("Game is not launchable") return self.state = self.STATE_LAUNCHING self.emit("game-start") jobs.AsyncCall(self.runner.prelaunch, self.configure_game)