Commit Graph
336 Commits
Author SHA1 Message Date
libretroadmin 91351e6dfc menu_setting: define the region emitters once for the whole unit
The per-region begin and end includes were still four hundred and
eighty-two include lines for one repeated purpose; nothing between
regions uses the emitter names, so the set now defines once before
the first def include and undefines once after the last, and a
generated region is exactly its def include. The compiled object is
byte-identical either way - this class of change never reaches the
binary - and the migration tool emits the bare include from here
on.
2026-07-07 10:08:44 +02:00
libretroadmin 02659d3d5f menu_setting: factor the region emitter scaffolding into shared headers
Every generated region inline-carried the same emitter define set
and undefine tail, stamped out 241 times - seventeen thousand lines,
43 percent of the file - burying the code the file exists for. The
set is provably uniform (one body per name across all regions), so
one begin header and one end header replace every run and a region
is now three include lines. 41,267 lines become 18,599; 1.69
megabytes become 711 kilobytes; the compile lanes, the name-keyed
dump and the settings dump are all byte-identical. The migration
tool emits the factored form from here on.
2026-07-07 10:03:07 +02:00
libretroadmin 0c60330e3c tools/settings_migrate_group: allow genuinely unpersisted fields
The game AI overrides have no configuration row and no manual
assignment - upstream never saved them - so the def emits no config
row and behavior is preserved exactly.
2026-07-07 09:01:46 +02:00
libretroadmin 5a5a95a696 tools/settings_migrate_group: tolerate null-to-value lookups from strings-always
Consuming guarded base-language rows and emitting them without the
guard resolves lookups that were null on excluded define sets; the
lookup gate now accepts exactly that transition for the migration's
own tokens and still refuses any value change or loss.
2026-07-07 08:56:20 +02:00
libretroadmin ab456bda9d tools/settings_migrate_group: tolerate parent-matched lane noise
The platform-profile lanes surface pre-existing pedantic errors the
battery did not mint - the Lakka Switch configuration path carries
dozens - and each new count grew another hardcoded tolerance. A
failing lane now recompiles on the stashed parent and passes when
the error count matches exactly, so a migration is judged by what
it changes.
2026-07-07 08:56:20 +02:00
libretroadmin 6a93e60c7e tools/settings_migrate_group: match single-argument reference actions
A plain action row closes directly after its token; the reference
literal head accepted only a trailing comma.
2026-07-07 08:56:20 +02:00
libretroadmin b18ecc4d5e settings, tools: wire the array-target grammar kinds
Array-target rows aim at nested members through an offset
expression - the custom viewport's width, height and position -
that no flat field name reaches. The def grammar gains S_INT_AT and
S_UINT_AT_EX with the offset carried verbatim in first position;
configuration rows stay literal, since the viewport keys persist
through hand-written pointer forms; the shared regions, undef
tails, enum emitter, Crowdin parser and name harness all learn the
new forms.
2026-07-07 08:43:27 +02:00
libretroadmin 8de3862533 tools/settings_migrate_group: reference rows whose label a twin def already owns
The quit visibility pair migrated variant-first, so the plain row
found its label string living in the level-variant def; such a row
becomes a reference like any other owned token.
2026-07-07 07:59:24 +02:00
libretroadmin ee04d770dd tools/settings_migrate_group: honor the configuration row's own guard stack
The widget scale table is guarded on console and mobile targets,
but its configuration row is not - the setting persists on desktop
where the menu entry never appears. The row wrapper carried the
table guard into every pass, silently dropping the desktop
registration; caught by the settings dump as the value falling to
zero. When the captured configuration guards lack any table or row
guard, the outer wrapper now exempts the configuration pass and the
inner wrapper gates it on the row's full upstream stack.
2026-07-07 07:59:23 +02:00
libretroadmin e959e44709 tools/settings_migrate_group: permit plain rows with level-variant twins
The entanglement guard predates the level-variant grammar; a plain
row whose twin is a level-variant row now migrates first and owns
the shared strings and configuration, and the twin references it.
The array-target variants remain refused until their grammar
lands.
2026-07-07 07:20:24 +02:00
libretroadmin a60886e062 tools/settings_migrate_group: keep the config row literal for twin-shared fields
A level-variant row whose field also carries a plain row in another
table shares one configuration row between compile-time variants;
consuming it would stamp one variant's default onto both - the
restart-visibility twin turned the quit entry's default off in
every non-Lakka build, caught by the settings dump gate. Such rows
leave the configuration row untouched.
2026-07-07 07:20:24 +02:00
libretroadmin 2c15df25fe tools/settings_migrate_group: skip the enum stage when every row is a reference
An all-reference migration owns no enum members; the marker splice
would find nothing to replace.
2026-07-07 06:25:41 +02:00
libretroadmin 63dd3d3a22 tools/settings_migrate_group: extract fieldless reference rows by token
Action rows have no field argument, so a referenced action's
literal extraction anchored on an empty field and matched nothing;
the head pattern now adapts.
2026-07-07 06:25:41 +02:00
libretroadmin 3cd35fe232 tools/settings_migrate_group: level-variant rows with owned label tokens become references
The quit action's level variant borrows both its tokens from
migrated defs; such a row contributes only its descriptor and stays
a menu-only literal, with every string and enum member at its
owner.
2026-07-07 06:25:41 +02:00
libretroadmin 6efbb60f86 tools/settings_migrate_group: recognize def-owned value tokens in the reference check
A level-variant row's value token may be owned by a migrated def,
where the value string rides the row rather than a literal MSG_HASH
invocation; the existence check now recognizes the row form.
2026-07-07 06:25:41 +02:00
libretroadmin 45ad7c9a7a tools/settings_migrate_group: anchor the strings region when nothing is consumed
A level-variant row without a sublabel consumes no base-language
spans, so the insertion anchor fell over an empty span list; such a
region anchors at the end of the file instead.
2026-07-07 06:12:42 +02:00
libretroadmin b293d3bd9e tools/settings_migrate_group: emit the level-variant names in the enum regions
The enum-region define set was a hardcoded name list that predated
the level-variant kinds; a migrated level-variant def's include
left its row unexpanded inside the enum, truncating every member
after it. The list now carries the eight level-variant forms, whose
bodies are the label token only.
2026-07-07 06:12:41 +02:00
libretroadmin 5805df98d9 tools/msg_hash_name_harness: build the dump driver unoptimized
The generated table is a quarter-million rows; the optimizer buys
nothing for a straight dump and costs most of a minute per build in
the single-core fallback environment.
2026-07-07 05:54:44 +02:00
libretroadmin ac6d795608 tools/settings_migrate_group: build the settings-dump binaries unoptimized
The A and B dump builds recompile the three largest translation
units twice per migration; dump equality does not depend on
optimization, and the single-core fallback environment spends the
whole battery budget in the optimizer. Falls back to the default
flags if the override does not link.
2026-07-07 05:54:43 +02:00
libretroadmin 47ce2caf05 tools/msg_hash_name_harness: enumerate level-variant def rows
The def-row parser's suffix group gains the level-variant form so
the label, sublabel and value names of a migrated level-variant
setting keep resolving in the dump.
2026-07-07 03:50:06 +02:00
libretroadmin 5d46c0d84b tools/settings_migrate_group: emit guarded base-language strings unconditionally
Guarded value and sublabel rows under an unguarded label row were
refused as mixed topology; the campaign's model is strings-always,
so such rows are now consumed and emitted without the guard,
trading a few string bytes on the excluded platform for one source
of truth. The context scaling pair, alternated on the OdroidGo2
define, surfaced the class.
2026-07-07 03:50:06 +02:00
libretroadmin d9954c012e tools/settings_migrate_group: the migrating table is not entangled with itself
Level-variant rows now pass through the front end, so the
entanglement guard must scan every table except the one being
migrated, and level-variant rows themselves are exempt - the guard
exists to protect a plain row from a variant twin elsewhere, not to
refuse the variant grammar it was waiting for.
2026-07-07 03:28:32 +02:00
libretroadmin 9c779f2ec6 settings: carry the level-variant emitter names in the shared regions
The per-kind configuration regions and the base-language string
regions are shared blocks that every def's include enters; the
level-variant names now expand there - kind-matched real bodies in
the matching config region, empty elsewhere, sublabel-only in the
strings regions, since a level-variant row's value string belongs
to its value token's owner - and every region tail undefines the
new names.
2026-07-07 03:28:32 +02:00
libretroadmin 835a7d9873 tools/settings_migrate_group: wire the level-variant grammar kinds
Level-variant rows carry independent label and value tokens - the
quit entry that reads Restart on Lakka, the context scaling display
names, the fullscreen and windowed widget scale pair. The def
grammar gains S_BOOL_LV, S_FLOAT_LV, S_STRING_LV and S_ACTION_LV
with the value token in second position; the menu emission maps to
the SDESC level-variant descriptors, and the strings pass emits the
sublabel only, because the value string belongs to the value
token's own def and is referenced, never duplicated. Extraction,
formatting and the value-token reference checks land with the
pilot.
2026-07-07 02:52:33 +02:00
libretroadmin 9c570fcd20 tools/settings_migrate_group: allow custom-persisted rows to omit config emission
The message color channels persist through a packed hexadecimal key
with hand-written parsing, not through SETTING_ rows; a field
assigned outside the row tables keeps its custom persistence and
the def emits menu, string and enum semantics only.
2026-07-07 01:53:05 +02:00
libretroadmin 4a8842c0cd tools/settings_migrate_group: match two paren levels in row argument spans
The message color defaults shift and mask inside an outer grouping,
two nesting levels deep, which the one-level span silently skipped;
the row-count crosscheck refused the table. All span patterns now
carry the deeper alternative.
2026-07-07 01:53:05 +02:00
libretroadmin bc031c65ef tools/settings_migrate_group: tolerate the 3DS initializer noise in its lanes
Two pre-existing pedantic initializer errors under the 3DS define,
same class as the Lakka systemd toggle; measured on the parent tree
and tolerated at exactly that count.
2026-07-07 01:22:19 +02:00
libretroadmin 41116bc0f0 tools/settings_migrate_group: carry the rcheevos include path in the lane flags
An achievements-guarded row mints a cheevos lane whose menu
translation unit pulls the rcheevos public headers; the compile
flag set only carried them for the preprocessor driver.
2026-07-07 01:22:19 +02:00
libretroadmin 3987b4ccab tools/settings_migrate_group: extract rows in source order across kinds
Extraction concatenated field-kind rows, plain actions and extended
actions as three groups, silently reordering any table that
interleaves them - menu display order is row order, and the third
main menu list opens with an extended action between plain ones.
Rows now merge by match position; the token gate caught the drift.
2026-07-07 01:22:19 +02:00
libretroadmin 6c7861213d tools/settings_migrate_group: stop overwriting extended action rows in the no-sublabel path
The action branch of the no-sublabel formatter emitted the correct
row and then fell into the generic field-kind emission because the
guard tested inequality with the plain action kind only; the
extended action kind matched neither and took both branches, the
second clobbering the first with an empty field argument and the
wrong arity.
2026-07-07 01:22:19 +02:00
libretroadmin c0930342ce tools/settings_migrate_group: tolerate the Lakka initializer noise in compound lanes
The systemd service toggle's pre-existing pedantic noise was
tolerated only when the lane flag was exactly the Lakka define; a
row guarded by Lakka in conjunction with another define builds a
compound lane that carries the same noise.
2026-07-07 01:22:18 +02:00
libretroadmin 0716b6663c tools/settings_migrate_group: cloud sync implies networking in the lanes
The webdav settings struct members exist only when networking is
built, so a lane toggling the cloud sync define alone cannot
compile the cloud sync def; the couple table carries the
implication.
2026-07-07 00:54:27 +02:00
libretroadmin 7f7b648c1c tools/settings_migrate_group: couple platform defines in the polarity lanes
The lanes derive their defines from row guard tokens, but some
tokens only appear alongside a partner in any real build - the iOS
SDK conditional rides with the build system's own IOS define, and a
lane carrying one without the other compiles a target that does not
exist. The silent-mode row guards on the SDK conditional while its
settings member guards on the build define, which surfaced the
class.
2026-07-06 21:56:27 +02:00
libretroadmin c6f7038f6f tools/settings_migrate_group: allow string literals past the C90 minimum
The 509-character figure is a minimum translation capacity, not a
ceiling any target compiler enforces; sublabels routinely exceed it
and the desktop menu group moved the first one long enough to trip
the pedantic lanes.
2026-07-06 21:56:27 +02:00
libretroadmin 86f6003ea5 tools/settings_migrate_group: carry reference rows literal inside the def
Trailing-only reference support could not express a table whose
owned rows interleave with its own, like the audio device group
whose microphone rows sit second and fourth; the reference rows now
ride inside the def itself as raw descriptor lines emitted only in
the menu pass, preserving row order at any position, with their
platform guards carried.
2026-07-06 19:54:09 +02:00
libretroadmin 7e59299c2a tools/settings_migrate_group: keep plain string config rows literal
The array-backed config region lives in populate_settings_array,
which no def has needed before; creating it from the integer
region's anchor put string emission inside the wrong function. The
plain string kind joins the directory and path kinds in keeping its
configuration row literal until the arrays region gets a proper
anchor.
2026-07-06 19:37:45 +02:00
libretroadmin 9ffde46783 settings: undefine the help-variant emitters at every region tail
The region tails undefined the base and no-sublabel emitter names
but not the help variants, so a region that defined a help form
leaked it into the next region of a different kind; the microphone
device string row expanded with the string body inside the integer
populate function through exactly that leak. The tool emits the
full undef set for new regions and every shipped tail is
retrofitted.
2026-07-06 19:37:42 +02:00
libretroadmin 47f22c68cb tools/settings_migrate_group: keep trailing reference rows literal
A table can mix rows of its own with rows whose token strings are
already owned by another def file; the owned rows keep their
literal descriptor after the generated include, preserving order,
and only trailing reference rows are supported - anything else
still fails with the owner named. The audio skew group references
the microphone block frames setting and surfaced the class.
2026-07-06 18:54:36 +02:00
libretroadmin 3ee44cd0cd tools/settings_migrate_group: tolerate census-fresh names in the enum gate
The enum stage's pre dump is taken mid-run, before the def file is
included anywhere in the enum header, so a token whose label string
was first introduced by this migration's census rows resolves to
null in pre and to its canonical name in post. That exact
transition, restricted to the migrating rows' own names, is now
accepted; any other difference still fails.
2026-07-06 16:09:54 +02:00
libretroadmin ac1f9738cf tools/settings_migrate_group: inherit the configuration row's enclosing guard
Tables in the menu translation unit carry no textual menu guard,
but their configuration rows can sit under one - or under any
narrower platform conditional - and a default referencing menu-only
symbols must not reach the config pass on builds that lack them.
The config-row guard stack, minus what the table guard already
implies, now wraps the def row for the config pass only; the
history-icons default is a menu enum and surfaced the class.
2026-07-06 15:44:10 +02:00
libretroadmin ba18e2719d tools/settings_migrate_group: detect token ownership for field-kind rows too
The owner search matched the token in first argument position only,
the action shape; a field-kind def row carries the field first, so
shared tokens like the per-driver GPU index reported a bare value
miss instead of naming their owner.
2026-07-06 13:52:19 +02:00
libretroadmin 4bfa36cea3 tools/settings_migrate_group: join backslash-continued guard lines
A conditional split across physical lines with a continuation was
captured as its first line only, truncating the condition and
leaking the backslash into the flattened guard expression - the
window-position table sits under exactly such a two-line guard.
Both the enclosing walker and the body scanner now join
continuations before classification.
2026-07-06 10:50:45 +02:00
libretroadmin de1b5ee260 tools/settings_migrate_group: stub external headers at their include subpath
Platform SDK includes carry directory components; flattening the
stub to its basename leaves the include unresolvable and the healer
looping on the same header. The stub now mirrors the include path
under the stub root.
2026-07-06 10:30:34 +02:00
libretroadmin de24e63899 tools/settings_migrate_group: refuse to overwrite an existing def file
Migrations now land from more than one workstation; a name chosen
locally can collide with a def file that arrived upstream in the
meantime, silently clobbering the other setting's single source.
The target def name must be fresh.
2026-07-06 10:21:25 +02:00
libretroadmin 4a79c00be5 tools/settings_migrate_group: put the canonical name before the argument span on action rows
The extended action signature carries the name second, before the
descriptor arguments; the formatter emitted the span first, landing
a display flag in the name slot - caught by the us TU lane on the
first extended action row. Plain action rows have an empty span and
were unaffected.
2026-07-06 09:14:32 +02:00
libretroadmin bdf643647b settings: re-land the extended-row grammar without macro chaining
The October attempt failed under MSVC's traditional preprocessor
because of the alias-prelude machinery built around the extended
descriptor macros, which expanded to nothing and emptied or
truncated tables. The macros themselves are plain single-level
struct initializers, the same construct class the base grammar and
the five kinds added since have compiled under cl for the whole
campaign, so this re-land is a straight replay of that proven
wiring: one-time consumer define-set extensions everywhere with _H
forms alongside, kind-matched configuration bodies in the five
regions, the parsers carrying the marker as a suffix group with
ordered renumbering, extraction and the guard scan accepting the
row heads, and direct emission maps onto the extended macros. No
aliasing, no chaining, no preprocessor construct that is not
already green in over a hundred def files.
2026-07-06 07:47:06 +02:00
libretroadmin f2a2ec32f3 tools/settings_migrate_group: name the owner when a token is already migrated
A submenu entry can appear in more than one descriptor table; once
one table's migration takes ownership of the token's strings and
enum triple, the other table's literal row is a pure reference that
compiles against the region-provided members and needs no def of
its own. The value-lookup failure now says which def file owns the
token instead of a bare assert.
2026-07-06 07:25:03 +02:00
libretroadmin 524feb46e9 tools/settings_migrate_group: give the pedantic lanes the header stub dir
A menu row guarded by HAVE_MIST makes the per-guard pedantic lane
compile menu_setting.c with the flag set, pulling steam.h and its
external mist.h; the self-healing stub directory the token gate
already uses now serves the pedantic lanes too.
2026-07-06 06:35:47 +02:00
libretroadmin 4a4fdc87bc tools/settings_migrate_group: format no-sublabel action rows correctly
The no-sublabel branch fell through to the generic field-kind
formatter for actions, emitting a five-argument S_ACTION_NS row
against a three-parameter name; the branch now mirrors the action
special case.
2026-07-06 06:35:44 +02:00
libretroadmin 542b7ff632 tools/settings_migrate_group: honor the help marker on action rows
An action row whose token carries a help string must emit the _H
form so the enum region keeps the help member; the formatter
dropped the marker and the consolidated region lost the enum out
from under its string row.
2026-07-06 06:18:05 +02:00