Skip to content

MicrosoftGame.config: attribute values with their character references replaced - #52

Merged
ivall merged 1 commit into
xcl-dev:mainfrom
gefydev:xml-attr-entities
Nov 22, 2026
Merged

ivall merged 1 commit into
xcl-dev:mainfrom
gefydev:xml-attr-entities

Conversation

@gefydev

@gefydev gefydev commented Nov 22, 2026

Copy link
Copy Markdown
Member

xml_attrs (launcher.rs) returns attribute values as they are written in MicrosoftGame.config. A & in an attribute has to be written &, so since 9a15c53 a game called "Ratchet & Clank" gets XCL – Ratchet & Clank as its window title. The same reader gives the Executable Name values, and an escaped character there names a file that doesn't exist.

Values now go through a small xml_unescape: the five named references (& < > " ') and numeric ones (', '). Anything that isn't a valid reference (a bare &,  , &#xZZ;) stays as written.

Validation

  • New test attribute_values_have_their_character_references_replaced, and a & case in display_name_is_the_shell_name_unless_it_is_a_resource. Both fail on main and pass with the change.
  • cargo test -p xcl --lib: 340 passed, 0 failed, on Windows GNU under Wine.

…s replaced

xml_attrs returned values as written, so a display name such as
"Ratchet & Clank" showed in the XCL window's title with the &,
and an Executable Name with an escaped character named a file that does
not exist. The five named references and numeric ones are now replaced;
anything else stays as written.
@ivall
ivall merged commit dd713e3 into xcl-dev:main Nov 22, 2026
@ivall

ivall commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Thanks, merged, and good catch on my 9a15c53!

The decoder looks right to me:

  • only a well-formed reference is replaced, and a bare & or   stays as written;
  • ' with an upper-case X stays too, which matches XML, where hex references take a lower-case x.

The values it touches are the Executable names, the Identity name and the display name. Of those, only the display name and the exe names can contain a &; package identities can't.

All tests pass with the MSVC toolchain on Windows: 343 lib tests with your new one, plus the e2e test title. My four titles' configs have no & at all, so nothing changes for them.

vincentes added a commit to vincentes/xcl-wasm that referenced this pull request Nov 24, 2026
In the software D3D12.X device:

- The console's frame clock (device xcl-dev#78–xcl-dev#81): SetFrameIntervalX,
  ScheduleFrameEventX, WaitFrameEventX (the origin hands out the frame's
  token; S_FALSE at the timeout) and GetFrameStatisticsX, on guest time.
  The ancillary handles of an event are not signalled.
- PresentX (queue xcl-dev#30) goes through the queue like everything else; when
  the queue gets to it the frame is flipped for the statistics and the
  back buffer's memory is kept as `d3d.frame` (width, height, format,
  pixels) for the host to show. Textures are linear in this device: the
  console's tiling is not modelled.
- ClearRenderTargetView (list xcl-dev#52) fills a target of 8 bits a channel;
  CreateRenderTargetView remembers which resource a descriptor shows.
- The device answers QueryInterface for IDXGIDevice / 1 / 2 with an
  object of that layout; its adapter has the device's LUID and no output.

Measured on macOS (aarch64): the test title's "frame clock + PresentX of
the title's back buffer" passes, 41 checks in all. `cargo test -p
xcl-guest`: 47 passed, 0 failed, run on the staged tree in a separate
copy: the working tree does not build at the moment (another agent's
half-written crates/xcl/src/hle/export_names.rs).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants