Repository navigation
Don't report matrix copies of flipper buttons as duplicate inputs - #50
Merged
Merged
Conversation
[Low impact] The PR appears safe to merge. SummaryThe converter stops reporting duplicate-input warnings for one generic flipper button paired with one other switch claiming the same action. The generic button keeps the action; the other switch stays available for manual mapping.
Reviews (1) · Last reviewed commit: "editor: Don't report matrix copies of fl..." · Reviewed by Greptile |
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.
Pre-Fliptronic WPC definitions list each flipper button twice: as the generic cabinet button and as the matrix switch PinMAME mirrors it into. The converter already gives the input action to the generic button and leaves the matrix copy unmapped, but it also reported a "Duplicate input action" diagnostic for every such copy, so a correct import showed two warnings.
That diagnostic is now skipped when an action has exactly one generic flipper button and one other switch. Anything more ambiguous, such as a second matrix switch with the same flipper role, or two switches both claiming a cabinet action like Start, still produces the diagnostic and leaves the extra switch for manual mapping.
Testing
PrefersGenericFlipperButtonsOverMatrixCopiesnow runs with and without a conflicting third right-flipper switch and checks the diagnostic count (0 and 2). Both cases fail on the previous converter.ReportsDuplicateCabinetInputActionscovers two Start switches.VisualPinball.Engine.PinMAME.Test: 58 passed, 2 skipped (corpus-dependent).