Repository navigation
Add Check Profile: catch device-numbering swaps and other silent profile problems - #38
Merged
Merged
Conversation
…le problems Today's repair of Amr's live profile turned up four problems that neither the game nor SCPE reported (a view action forced to "press", a hat with its view directions cleared, one button firing two mode switches, and stick tuning saved under an old device ID). Amr also asked for a check that the profile's js1/js2/... numbering matches the order the PC lists the sticks, since a mismatch silently moves bindings to the wrong stick. profile_checker.py reads the raw XML (exported layout or live actionmaps.xml) and returns findings; system_devices.py supplies the PC's stick order from DirectInput on Windows (the game's source), pygame elsewhere, or the virtual sticks in --mock-joysticks mode so it is testable without hardware. The dialog shows profile-vs-PC slots side by side and can re-check after re-plugging. Unsaved edits are checked via a temp export. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011hqxFh5GLh4UnV4rY8Fzdw
…ect-thread-sjzrlr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Amr · project thread
What
Adds a Check Profile button to the header. It checks the loaded profile, unsaved edits included, and lists problems that the game never reports:
activationMode="press"(stuck camera, same bug as PR #32)The device table shows each profile slot next to what this PC has in that slot now. Check again re-reads the sticks after you re-plug one.
How the stick order is read
src/utils/system_devices.py:EnumDevices(GAMECTRL, ATTACHEDONLY)viactypesondinput8.dll. This is the order the game uses. No new dependency. Xbox-style XInput pads are skipped because the game treats them as a gamepad, not as jsN.--mock-joysticks: the virtual sticks in panel order, so you can test without hardware.tests/fixtures/mock_devices/check_profile_swapped.jsoncombined withtests/fixtures/profiles/check_profile_problems.xmlshows a swap.Verified
pytest tests/: 90 passed. 20 of them are new intests/test_profile_checker.py.actionmaps.xmlfrom today, before the repair, it flags all four problems from the repair: forced press on look-behind, the EVO R hat with view yaw cleared, js3_button27 switching salvage and mining, and EVO L tuning under0205. On the repaired layout, those four are gone.layout_osiris-vkb-2025-10-25_exported.xml.Needs a Windows test
The DirectInput path can't run in CI. On the game PC, open your profile and click Check Profile. The device table should show "Windows DirectInput" as its source, and all five slots should match. Then unplug one stick and press Check again.
Release
This is a feature, so it belongs in 0.11.0, not the 0.10.2 patch. It is based on
main, like PR #37 was. Retarget it torelease/0.11.0once that branch opens. The CHANGELOG entry is under[Unreleased].Generated by Claude Code