MicrosoftGame.config: commented-out entries are not the game's #61
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/62"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by gefydev on 2026-11-22T23:10:42Z.
launcher.rsreads MicrosoftGame.config by searching for tags in its text (xml_attrs), so a tag inside an XML comment counts like a real one:<!--<Executable Name="old.exe" Id="Game"/>-->before the real entry:pick_exelaunchesold.exeif that file is in the folder (it takes the first listed exe that exists).<!-- <Identity Name="Contoso.Old"/> -->before the real one: the title, and with it the data folder, gets the old name.ShellVisuals DefaultDisplayName(the window title).decode_game_confignow removes<!-- ... -->after decoding (an unterminated comment runs to the end of the file), soread_game_config,display_nameandpick_exeonly see live entries.Validation
commented_out_entries_are_not_the_games: a config with a commented-out Identity, Executable and ShellVisuals, and bothold.exeandgame.exein the folder. Onmain,read_game_configreturns(["old.exe", "game.exe"], Some("Contoso.Old")); with the change it returns(["game.exe"], Some("Contoso.Test")),pick_exepicksgame.exeand the display name is the live one.cargo test -p xcl --lib: 344 passed, 0 failed, on Windows GNU under Wine.Imported from ivall/xcl. Originally posted by ivall on 2026-11-23T10:20:55Z.
Merged as part of #63 (
5412c24). Tested on Windows 11 with an RX 9070:cargo test --workspacegreen with the retail samples (shader pack, console DLLs, texture archive), and Unicorn Overlord reaches its title screen with everything from this round merged. Thanks!