INI import: strip greeting quotes; add gsheet reference

Strip a surrounding pair of double quotes from the [Plasma] Greeting on
import (the gsheet "INI_V2" output writes Greeting="..."), and add the
master button-layout spreadsheet that documents the RIO.ini format and the
16-bit map-word encoding. Test covers the real sheet output (modifier-stacked
words, keypad VK words, RIO command words) round-tripping verbatim.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Cyd
2026-06-27 22:55:36 -05:00
co-authored by Claude Opus 4.8
parent 094637b0a4
commit a4a3b58f7e
3 changed files with 44 additions and 1 deletions
@@ -55,4 +55,37 @@ public class RioIniImporterTests
RioProfile p = RioIniImporter.Import("[JoyStick]\ninvertX = true");
Assert.True(p.Calibration.EnableZR);
}
// The real gsheet "INI_V2" output: modifier-stacked words (0x8F26 =
// lit+shift+ctrl+alt+ext + VK 0x26), keypad VK words (0x30), and RIO
// command words (0x7000) must all survive import verbatim.
private const string SheetSample = """
;RIO INI V2 built useing gsheet configurator's final value
[Desktop]
File=C:\games\RIO\defalt.bmp
[Plasma]
Greeting="Hello,"
[JoyStick]
invertX=0
enableZR=1
[Buttons]
RIO04=0x8F26
RIO50=0x30
RIO60=0x7000
RIO6F=0x700F
""";
[Fact]
public void Imports_RealSheetOutput_PreservesRawWords()
{
RioProfile p = RioIniImporter.Import(SheetSample, "Sheet");
Assert.Equal(0x8F26, p.Buttons[0x04]); // lit + all modifiers + extended
Assert.Equal(0x30, p.Buttons[0x50]); // keypad '0'
Assert.Equal(0x7000, p.Buttons[0x60]); // RIO command word
Assert.Equal(0x700F, p.Buttons[0x6F]); // last address in the table
Assert.Equal(@"C:\games\RIO\defalt.bmp", p.WallpaperPath);
Assert.Equal("Hello,", p.PlasmaGreeting); // surrounding quotes stripped
}
}