Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
BIOS,
CONFIGS,
DEFAULTS_DIR,
ES_SETTINGS,
ROMS,
SAVES,
SCREENSHOTS,
Expand Down Expand Up @@ -147,7 +148,17 @@ def generate(self, system, rom, playersControllers, metadata, guns, wheels, game
commandArray += [ "-cheatpath", MAME_CHEATS ] # Should this point to path containing the cheat.7z file

# Logs and Swithres ini read by default (including its own verbose)
commandArray += [ "-verbose" ]
# Use full MAME logging when debug logging is enabled, else oslog. Verbose logging also enables debug pop up messages during gameplay.
try:
logLevel = next((
entry.get("value")
for entry in ET.parse(ES_SETTINGS).getroot().iter("string")
if entry.get("name") == "LogLevel"
), None)
except (ET.ParseError, OSError):
logLevel = None

commandArray += [ "-verbose" if logLevel == "debug" else "-oslog" ]
commandArray += [ "-switchres_ini" ]

# MAME saves a lot of stuff, we need to map this on /userdata/saves/mame/<subfolder> for each one
Expand Down