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

Add support for extra and potentially unbound GamePad buttons (Fixes GitHub #11273) #16035

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
8bcaabe
Commit CLion settings to repository, VSCode settings already exist an…
XerTheSquirrel Dec 23, 2023
1e720ef
Bump netplay version; Slight refactor of inputs to use macros rather …
XerTheSquirrel Dec 23, 2023
a5bc084
Base new hypothetical input query for information about an input device.
XerTheSquirrel Dec 23, 2023
7bb7270
Add glyph as well.
XerTheSquirrel Dec 23, 2023
b35169a
Simplify greatly.
XerTheSquirrel Dec 23, 2023
ef5da42
Corrections to naming, mark experimental.
XerTheSquirrel Dec 23, 2023
57df9c0
Just set something in the return value.
XerTheSquirrel Dec 23, 2023
f236b44
Initialize inputs and debug printing; Also as well fix some constants.
XerTheSquirrel Dec 23, 2023
36e4ade
For CLion add scope for dependencies so they can be excluded in searc…
XerTheSquirrel Dec 24, 2023
b88ddfd
Ignore .gdbinit.
XerTheSquirrel Dec 24, 2023
e0def8f
CLion Settings.
XerTheSquirrel Dec 24, 2023
909ba14
Commit before reversion... messy.
XerTheSquirrel Dec 24, 2023
07a304d
Revert "Commit before reversion... messy."
XerTheSquirrel Dec 24, 2023
545fb80
Extra commands instead.
XerTheSquirrel Dec 24, 2023
e7d2f78
Minor work on extras.
XerTheSquirrel Dec 24, 2023
4d46d82
Fix pedantic error.
XerTheSquirrel Dec 24, 2023
0bfcf38
Fix pedantic error, again.
XerTheSquirrel Dec 24, 2023
1d51d77
Add inlines and defines for game controller bind ids.
XerTheSquirrel Dec 24, 2023
bd7b718
Declare all 128 extra binds input_config_bind_map using the power of …
XerTheSquirrel Dec 24, 2023
6a87d39
Add all of the logical keys to input_config_bind_order, which are jus…
XerTheSquirrel Dec 24, 2023
a15c7e6
Base for attempt to get logical buttons loaded into the menu; Correct…
XerTheSquirrel Dec 24, 2023
ea4fb65
More base work to get working on the menu.
XerTheSquirrel Dec 24, 2023
0381810
Add room to fit all of the logical keys in the menu.
XerTheSquirrel Dec 24, 2023
33aff0a
Increase sizes more?
XerTheSquirrel Dec 24, 2023
05d8935
Add NIL which is an empty token to hopefully fix C89 build.
XerTheSquirrel Dec 24, 2023
aabdbc3
Try C89 fix again without double wrapping NIL.
XerTheSquirrel Dec 24, 2023
175dcc7
Longer list of macros but no longer has blank tokens; Correct bind or…
XerTheSquirrel Dec 25, 2023
c163451
Adjustments to action_start_input_desc.
XerTheSquirrel Dec 25, 2023
9fc11df
Adjustments to API to simplify it along with setting various binds.
XerTheSquirrel Dec 25, 2023
a5cfcfc
Filling in of the input descriptors accordingly.
XerTheSquirrel Dec 25, 2023
da49581
Swap port and device; Add extra debugging.
XerTheSquirrel Dec 25, 2023
f802658
Work on the menus regarding binds.
XerTheSquirrel Dec 25, 2023
4229354
Add keybinds for all 128 logical buttons.
XerTheSquirrel Dec 25, 2023
24655a1
Actually make each bind unique.
XerTheSquirrel Dec 25, 2023
5bbfa7c
There is no need to paste in the bind order.
XerTheSquirrel Dec 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ xcuserdata
profile
*.moved-aside
DerivedData
.idea/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding that .idea directory? Intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

*.hmap
apple/tmp
apple/*.mobileprovision
Expand Down Expand Up @@ -249,3 +248,4 @@ param.sfo

# Visual Studio Code
.vscode/
/.gdbinit
8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/fileColors.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .idea/scopes/Dependencies.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions config.def.keybinds.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,36 @@
#ifndef __CONFIG_DEF_KEYBINDS_H
#define __CONFIG_DEF_KEYBINDS_H

#define JOYPAD_LOGICAL_ENTRY(index) {\
NULL, NULL,\
AXIS_NONE, AXIS_NONE, AXIS_NONE,\
MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LOGICAL, RETROK_UNKNOWN,\
RARCH_EXTRA_CORE_COMMAND_START + (index), NO_BTN, NO_BTN, 0,\
true\
}
#define JOYPAD_LOGICAL_ENTRY_TEN(base) \
JOYPAD_LOGICAL_ENTRY(base), \
JOYPAD_LOGICAL_ENTRY(base + 1), \
JOYPAD_LOGICAL_ENTRY(base + 2), \
JOYPAD_LOGICAL_ENTRY(base + 3), \
JOYPAD_LOGICAL_ENTRY(base + 4), \
JOYPAD_LOGICAL_ENTRY(base + 5), \
JOYPAD_LOGICAL_ENTRY(base + 6), \
JOYPAD_LOGICAL_ENTRY(base + 7), \
JOYPAD_LOGICAL_ENTRY(base + 8), \
JOYPAD_LOGICAL_ENTRY(base + 9)
#define JOYPAD_LOGICAL_ENTRY_HUNDRED(base) \
JOYPAD_LOGICAL_ENTRY_TEN(base), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 10), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 20), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 30), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 40), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 50), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 60), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 70), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 80), \
JOYPAD_LOGICAL_ENTRY_TEN(base + 90)

#ifndef IS_SALAMANDER

/* User 1 */
Expand Down Expand Up @@ -1927,6 +1957,20 @@ static const struct retro_keybind retro_keybinds_1[] = {
RARCH_OSK, NO_BTN, NO_BTN, 0,
true
},

/* 128 Logical extra joypad buttons. */
JOYPAD_LOGICAL_ENTRY_HUNDRED(0),
JOYPAD_LOGICAL_ENTRY_TEN(100),
JOYPAD_LOGICAL_ENTRY_TEN(110),
JOYPAD_LOGICAL_ENTRY(120),
JOYPAD_LOGICAL_ENTRY(121),
JOYPAD_LOGICAL_ENTRY(122),
JOYPAD_LOGICAL_ENTRY(123),
JOYPAD_LOGICAL_ENTRY(124),
JOYPAD_LOGICAL_ENTRY(125),
JOYPAD_LOGICAL_ENTRY(126),
JOYPAD_LOGICAL_ENTRY(127),

#if 0
/* Deprecated */
{
Expand Down Expand Up @@ -2194,6 +2238,27 @@ static const struct retro_keybind retro_keybinds_rest[] = {
RARCH_TURBO_ENABLE, NO_BTN, NO_BTN, 0,
true
},

{
NULL, NULL,
AXIS_NONE, AXIS_NONE, AXIS_NONE,
MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LOGICAL, RETROK_UNKNOWN,
RARCH_EXTRA_CORE_COMMAND_START, NO_BTN, NO_BTN, 0,
true
},

/* 128 Logical extra joypad buttons. */
JOYPAD_LOGICAL_ENTRY_HUNDRED(0),
JOYPAD_LOGICAL_ENTRY_TEN(100),
JOYPAD_LOGICAL_ENTRY_TEN(110),
JOYPAD_LOGICAL_ENTRY(120),
JOYPAD_LOGICAL_ENTRY(121),
JOYPAD_LOGICAL_ENTRY(122),
JOYPAD_LOGICAL_ENTRY(123),
JOYPAD_LOGICAL_ENTRY(124),
JOYPAD_LOGICAL_ENTRY(125),
JOYPAD_LOGICAL_ENTRY(126),
JOYPAD_LOGICAL_ENTRY(127),
};

#endif
Expand Down
Loading
Loading