104 Commits

Author SHA1 Message Date
libretroadmin
963bb92f95 (Input) Style nits/code simplifications 2023-02-19 06:30:14 +01:00
libretroadmin
daa9e352cc Remove asserts 2023-01-09 00:51:05 +01:00
neil4
b98c53ddb7
Improve haptic feedback for input overlays (#14517)
Repurpose vibrate_on_keypress to enable device's standard keypress feedback on overlay key/button state changes

- Add keypress_vibrate function ptr to input_driver_t (only implemented on Android for now)
- (Android) Remove APP_CMD_VIBRATE_KEYPRESS
- (Android) Add doHapticFeedback, called directly to avoid latency
2022-10-16 09:58:09 +02:00
LibretroAdmin
d0c6dfee0b Cleanup bitmask setting 2022-10-05 18:43:58 +02:00
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
Nicolas Roehm
b3c929499e
[Upd] error message 2021-07-10 14:10:12 +02:00
Toad King
c29241ec9e emscripten: only report back one screen pointer for rwebinput
fixes lockup when clicking on an overlay
2021-02-15 15:09:37 -06:00
twinaphex
454eff8688 (Emscripten) Cleanup 2020-09-02 17:56:01 +02:00
twinaphex
4cbee42692 Revert "(RWebInput) We're going to assume joypad driver code is not"
This reverts commit 6b63b392eacb08ef314f865554f22ca73f1ea3a4.
2020-09-02 15:31:32 +02:00
twinaphex
6b63b392ea (RWebInput) We're going to assume joypad driver code is not
needed for RARCH_DEVICE_ANALOG
2020-09-02 15:28:16 +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
55378ae9cc Cleanups 2020-09-02 01:22:34 +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
035efa5136 Inline pressed_analog functions into input_state function itself 2020-08-30 16:57:04 +02:00
twinaphex
e119d3c98e Further cleanups/standardizations to analog_pressed 2020-08-30 16:38:53 +02:00
twinaphex
97319d4f98 Standardize pressed_analog functions 2020-08-30 16:19:11 +02:00
twinaphex
d801dab8b4 Cleanups 2020-08-30 14:41:45 +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
ace0e3eb90 Cleanups 2020-08-28 19:58:13 +02:00
twinaphex
e6b9420a15 (Input) reorder structs, alignment 2020-08-26 15:32:05 +02:00
Dylan Scott
b4ac13cc5a
(Emscripten) Fix input code to ignore unknown keys 2020-07-14 03:33:55 -04: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
35c55c4b50 Potential fix for #10884 2020-06-22 20:34:40 +02:00
twinaphex
c7cd327b5b Rearrange input state input drivers for ANALOG - do joypad
processing first, then keyboard second
2020-06-13 05:25:10 +02:00
twinaphex
4a91b11806 Further input driver standardization 2020-06-12 18:28:07 +02:00
twinaphex
a7ab21ac15 (Emscripten) Buildfix 2020-06-11 21:21:20 +02:00
twinaphex
dee0c5dbca CTR buildfix + cleanups 2020-06-11 19:33:27 +02:00
twinaphex
cd01e0a048 Standardize input lightgun code 2020-06-11 16:58:49 +02:00
twinaphex
26b3ccf2e5 Don't pass joypad_info by value 2020-02-27 07:33:14 +01:00
Toad King
14c67fde7f emscripten: recreate input event listeners properly
There's a new (undocumented -_-) API for removing event listeners in emscripten
now, so use that when recreating input listeners. Fixes mouse events breaking
when loading cores.
2020-01-18 12:51:21 -06:00
Toad King
776568a429 fix images not loading in menu in emscripten
add changes to work with latest emscripten SDK
2020-01-02 21:29:25 -06:00
Toad King
f3001c9bba fix bug in emscripten input code 2019-12-14 20:57:10 -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
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
twinaphex
68cbd5048c Convert input_conv_analog_id_to_bind into macro 2019-06-19 05:16:24 +02:00
twinaphex
ee3208ac39 Integrate video_driver.c into retroarch.c 2019-06-17 15:10:22 +02:00
twinaphex
85708b7ef8 (Emscripten) Buildfixes 2019-02-03 17:15:18 +01:00
twinaphex
ea09c29e04 Update implementations for other input drivers - not all input
drivers support this yet
2018-07-15 14:34:02 +02:00
twinaphex
9a1ac6d77b (rwebinput) Fix game focus toggle 2018-07-15 14:22:16 +02:00
Toad King
ccb45a068d fix compiler warning 2018-01-15 04:52:35 -06:00
Toad King
460ceaef97 queue keyboard events and only process them when polling
fixes hitting enter from search box also selecting underlying menu item
2018-01-14 14:37:25 -06:00