51 Commits

Author SHA1 Message Date
gblues
1ef78d3e3d
Any pad can control the menu (#13173)
* Any pad can control the menu

== DETAILS
I am not sure I've quite got it so that any pad can *open* the
menu, but I do have it so any pad can control it.

- split out the input processing into a separate method
- track down and squish some hairy bugs that boiled down to
  bad pointer math
- it looks like `menu_driver.c` has a mix of line endings, so I
  ran it through `dos2unix` so it has consistent line endings
  again.
- verified that this change did not impact actual cores

* optimize out cumulative_bits

* Incorporate PR feedback

Many thanks to @jdgleaver for providing these optimizations.

* apply one more optimization
2021-11-03 16:32:15 +01:00
p-sam
ac8a977492 Replace deprecated HID APIs 2021-06-28 17:38:17 +02:00
p-sam
1bc588acbd Fix building with libnx 4.0.0 2021-06-28 17:38:17 +02:00
p-sam
059cd08530 libnx: fix touch, mouse and KB input 2020-09-30 09:23:28 +02:00
twinaphex
1c5f4e1dee Start cutting down on input_state - move all joypad driver code up to
higher-level retroarch.c
2020-09-02 15:26:03 +02:00
twinaphex
2fde8c21a9 Remove set_rumble function from input driver 2020-09-02 00:38:11 +02:00
twinaphex
acc0f2143f Change input_key_pressed so we no longer need to pass joypad
to the poll function callback
2020-09-01 21:43:39 +02:00
twinaphex
1d67ae3c63 Fix Android error 2020-09-01 17:41:05 +02:00
twinaphex
6f92c56ca3 Simplify input drivers 2020-08-31 02:07:43 +02:00
twinaphex
d4d8b6934a Put keyboard_mapping_blocked into p_rarch / rarch struct
instead
2020-08-30 18:47:29 +02:00
twinaphex
5f08605680 Refactor joypad drivers 2020-08-30 05:29:32 +02:00
twinaphex
84a312535e Cleanup set_rumble functions 2020-08-29 22:22:26 +02:00
twinaphex
b3744c3126 Put input_jpyad_init_driver last in 'input' callback function 2020-08-29 20:46:42 +02:00
twinaphex
5166eebcaf for loop cleanups - use space after 'for' 2020-08-19 03:06:22 +02:00
twinaphex
d97e590aaf Reimplement multi button state functions 2020-07-19 03:18:12 +02:00
twinaphex
689ac432d6 MOve input_joypad_analog call to inside retroarch.c instead of the
input driver itself, and make function static
2020-06-23 18:31:40 +02:00
twinaphex
4a91b11806 Further input driver standardization 2020-06-12 18:28:07 +02:00
twinaphex
eb78b608d3 Cut down on code duplication 2020-06-12 00:50:08 +02:00
twinaphex
ecfdc867f8 Cleanups 2020-06-12 00:16:31 +02:00
twinaphex
a7a03984f1 (input drivers) Cleanups 2020-06-10 04:00:40 +02:00
twinaphex
26b3ccf2e5 Don't pass joypad_info by value 2020-02-27 07:33:14 +01:00
twinaphex
880391d0c5 (libnx) Try to silence warnings 2020-02-10 12:36:11 +01:00
p-sam
49b87724eb (Switch) Implement driver sensor interface 2019-10-28 16:36:46 +00:00
p-sam
f7f0499601 Fix mixed indentation 2019-10-28 16:36:46 +00:00
Jeffrey Davenport
25f35ed67d Bug caused by typo 2019-08-13 02:26:13 -06:00
twinaphex
65b4c2595e Update set keyboard mapping code for input driver 2019-07-27 02:21:24 +02:00
twinaphex
bee9984745 Update all other input drivers 2019-07-22 01:20:00 +02:00
orbea
e13ec54dc6 Fix --disable-overlay. 2019-07-21 10:26:42 -07:00
twinaphex
f4104f5c9a Regression in
9c73d3305d
- joykey needs to be uint64_t and then is later cast to uint16_t -
is apparently important for hotkeys
2019-07-21 16:22:41 +02:00
twinaphex
4c69dad0ce Define DEFAULT_MAX_PADS inside config.def.h - get rid of the messy
MAX_PADS macros everywhere
2019-07-19 12:55:38 +02:00
rsn8887
7e348f132e [SWITCH] Proper x/y scaling for pointer devices, fixes touch lightgun 2019-07-02 16:42:17 -05:00
rsn8887
1caaea4bdf [SWITCH] Allow touch mouse gestures such as tap to click
This adds touch gestures to the touchpad-style mouse
controls. Before this, there was only pointer motion
via dragging a finger somewhere on the screen. Now,
there's tap to click and more.

Supported touch gestures:

- pointer motion = single finger drag
- left mouse click = single finger short tap
- right mouse click = second finger short tap
  while first finger is still down
- left click drag and drop = dual finger drag
- right click drag and drop = triple finger drag
2019-06-26 00:35:05 -05:00
rsn8887
d0c8809df4 [SWITCH] Allow finger drag to act as mouse movement 2019-06-24 20:02:24 -05:00
twinaphex
2f16fb1345 (libnx) Buildfix 2019-06-24 05:09:21 +02:00
twinaphex
9c73d3305d Insert input_joypad_pressed into drivers themselves 2019-06-23 18:20:48 +02:00
twinaphex
1e863b0f4d Optimal way of grabbing all button states in a bitmasked value -
should allow us to do only one function call to the RA input
driver's input state callback
2019-06-23 06:09:45 +02:00
rsn8887
5aa0d17659 [LIBNX] Fix USB keyboard support for controlling Vice core and Menu 2019-03-19 19:49:45 -05:00
rsn8887
208a68b528 [LIBNX] USB mouse support 2019-03-19 18:44:12 -05:00
rsn8887
f943688dff [LIBNX] USB keyboard support 2019-03-19 08:43:46 -05:00
Exvat
e7bf2a345c Add rumble support for the switch 2019-03-11 19:33:02 -07:00
orbea
28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
M4xw
efb71fc38e [LIBNX] Initialize HID anyway, might fix randomly having no controls 2018-10-27 19:27:24 +02:00
natinusala
ce873906fc libnx: add multitouch to input driver 2018-10-24 17:23:22 +02:00
natinusala
57db04b389 switch_input: add pointer capabilities 2018-10-08 14:36:03 +02:00
natinusala
a5f122a84e libnx: improve touch scaling calc 2018-10-03 18:50:36 +02:00
natinusala
fef4448ddb libnx: added touch support 2018-10-01 21:22:21 +02:00
twinaphex
517b1b9089 Add HAVE_LIBNX ifdefs to switch_input.c/switch_joypad.c, and
features_cpu.c
2018-09-12 19:54:51 +02:00
twinaphex
ea09c29e04 Update implementations for other input drivers - not all input
drivers support this yet
2018-07-15 14:34:02 +02:00
misson20000
7cc614263a (NSW) add default button bindings and fix right joystick 2017-12-31 03:04:11 +01:00
twinaphex
5c876647ed (NSW) Small cleanups 2017-12-29 00:45:00 +01:00