docs: quote command line flags in comments as code

The lone-dash check read MAME's -rompath and -samplepath, QUASI88's
-romdir and RetroBat's -hash and -sp as half a dash glued to a word.
Quoted as code they read as flags. A C loop quoted in romdir.py and a
docstring in test_agnostic_scope no longer read as clause semicolons.
This commit is contained in:
Abdessamad Derraz committed 2026-11-11 14:28:10 +01:00
1 parent 3fb21f9c1e
commit 02a400aead
8 files changed
+20 -20

No files matched your search

+3 -3
View File
@@ -3390,7 +3390,7 @@ def _build_layouts(
if f.get("bundled") and passed_setting(f):
# The copy installed with the emulator sits where the setting
# pointed before the launcher moved it: RetroBat passes MAME
# -hash bios/mame/hash (Mame64.Generator.cs:172, 177-178), and
# `-hash` bios/mame/hash (Mame64.Generator.cs:172, 177-178), and
# the hash/ beside mame.exe is no longer read.
moved = {k: v for k, v in f.items() if k != "bundled"}
files.extend(_placed_entry(moved, profile, placed) for placed in places)
@@ -3607,7 +3607,7 @@ def content_layout(
for t in tags if t.startswith(CONTENT_FOLDER_PREFIX)
) if core in names and where
})
# The folders a passed -rompath replaces the build's own search
# The folders a passed `-rompath` replaces the build's own search
# path with stand for these: libretro MAME hands MAME
# <system>/mame/bios unless the content's command line names
# another (retro_init.cpp Set_Path_Option, execute_game_cmd).
@@ -3649,7 +3649,7 @@ def content_layout(
if f.get("unplaced") != OUTSIDE_BIOS_FOLDER:
# A set a launcher record placed stays there: EmuDeck's
# mame.ini rompath is read when Steam ROM Manager starts MAME
# with no -rompath (tools/launchers/mame.sh), and ES-DE's
# with no `-rompath` (tools/launchers/mame.sh), and ES-DE's
# commands read the folders they pass.
out.append(f)
held = {(f.get("root") or "", f.get("standalone_path") or "")}
+1 -1
View File
@@ -1075,7 +1075,7 @@ def _bind(
list already fills (Batocera's bios/openmsx beside bios/Machines), else
the first of the BIOS tree, else the first a pack can fill. A list that
already holds the folder the layout's files take without the launcher
keeps them there: KNULLI starts MAME with -rompath
keeps them there: KNULLI starts MAME with `-rompath`
<romDirname>;/userdata/bios/mame;/userdata/bios, and the sets at the BIOS
root stay. A pool standing for the whole layout holds its files
directly, not its folders (SEARCHED_FILES): MAME reads hash/ and
+1 -1
View File
@@ -21,7 +21,7 @@ from dataclasses import dataclass
ENTRY_SIZE = 16
NAME_SIZE = 10
# for (i = 0; i < 512 * 1024; i++) in every LoadBiosVersion.
# `for (i = 0; i < 512 * 1024; i++)` in every LoadBiosVersion.
SEARCH_ENTRIES = 512 * 1024
ROMVER_SIZE = 14
EXTINFO_SIZE = 15
+1 -1
View File
@@ -1120,7 +1120,7 @@ def patched_paths(read: Callable[[str], str], patches: tuple[str, ...] = PATH_PA
# Generators whose command line hands the emulator /userdata/bios folders as
# search paths: MAME's -rompath and -samplepath (mame/mameGenerator.py).
# search paths: MAME's `-rompath` and `-samplepath` (mame/mameGenerator.py).
SEARCH_PATH_GENERATORS = ("mame/mameGenerator.py",)