Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analog button and keyboard tester #16390

Merged

Conversation

zoltanvb
Copy link
Contributor

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.

RetroPad Remote-240330-182629

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.
RetroPad Remote-240330-182858

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.

{
  "expected_button": 1032,
  "message": "Press spacebar"
},

Other small improvements: retropad core reset will use new option values, input driver applies received values more carefully.

Related Pull Requests

#16342
#16357

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. Added also core option to hide
mismatching inputs where analog value is not sent (like keyboard
hotkeys assigned to retropad buttons). Analog button inputs are not
set up for remote transmission, only for local test.

Analog axes have now also dynamic coloring.

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.

Other small improvements: core reset will take new option values,
input driver applies received values more carefully.
@zoltanvb
Copy link
Contributor Author

Hi, is there something I should change in this? There are a few other improvements/fixes I plan to do, where having this would come handy.

@hizzlekizzle
Copy link
Contributor

@LibretroAdmin care to take a look?

@zoltanvb
Copy link
Contributor Author

zoltanvb commented May 3, 2024

One more ping.

@LibretroAdmin LibretroAdmin merged commit 28189a0 into libretro:master May 4, 2024
27 checks passed
@sonninnos
Copy link
Collaborator

I'm getting this warning now:

cores/libretro-net-retropad/net_retropad_core.c: In function 'open_UDP_socket':
cores/libretro-net-retropad/net_retropad_core.c:589:7: warning: implicit declaration of function 'close'; did you mean 'fclose'? [-Wimplicit-function-declaration]
  589 |       close(s);
      |       ^~~~~
      |       fclose

@zoltanvb
Copy link
Contributor Author

zoltanvb commented May 4, 2024

Thx, buildbot also shows this. Looking...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants