Coverage for lutris.runners.sdlmame : 38%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
# pylint: disable=C0103 """Runs arcade games with SDLMame""" """ Mame initialization """ { "option": "main_file", "type": "file", "label": "Rom file" } ] { "option": "windowed", "type": "bool", "label": "Windowed" } ]
""" Launch the game. """ settings = self.settings fullscreen = True rompath = os.path.dirname(settings["game"]["main_file"]) rom = os.path.basename(settings["game"]["main_file"]) mameconfigdir = os.path.join(os.path.expanduser("~"), ".mame") if "sdlmame" in settings.config: if "windowed" in settings["sdlmame"]: fullscreen = not settings["sdlmame"]["windowed"] if not os.path.exists(os.path.join(mameconfigdir, "mame.ini")): try: os.makedirs(mameconfigdir) except OSError: pass os.chdir(mameconfigdir) subprocess.Popen([self.executable, "-createconfig"], stdout=subprocess.PIPE) os.chdir(rompath) options = [] if not fullscreen: options.append("-window") return {'command': [self.executable, "-inipath", mameconfigdir, "-skip_gameinfo", "-rompath", "\"%s\"" % rompath, "\"%s\"" % rom] + options} |