Analog button and keyboard tester #16390
Merged
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.
Description
Added analog button indication for those buttons that may have use for it - primarily L2/R2, but support was added for all buttons where at least one controller is known to support it (L,R,L2,R2,A,B,X,Y). The indication is a smaller rectangular area inside the button, which changes color according to the analog value, from black to red, see R2 on the screenshot. Analog axes have now also dynamic coloring.
Added also core option to show mismatching inputs where analog value is not sent (like keyboard hotkeys assigned to retropad buttons). If not hidden, the rectangular area remains white/green, see L1 on the screenshot.
Analog button values are not set up for remote transmission, only for local test.
Added a keyboard tester screen which includes a standard 102-key PC keyboard + extra blocks for all RETROK_ values present in the code. Screen adapted from DOSBox-Pure onscreen keyboard with permission. Keyboard button A+B switches between the two screens. Keyboard inputs are not set up for remote transmission, only for local test. Core option added to select start screen.
The test input part can now request pressing keyboard keys, by setting expected_button to 1000+RETROK_ value. Display will switch to keyboard if test sequence requires.
Other small improvements: retropad core reset will use new option values, input driver applies received values more carefully.
Related Pull Requests
#16342
#16357