336 Commits

Author SHA1 Message Date
libretroadmin
4d305bf3e8 Buildfixes for Android and Wayland 2023-02-19 10:09:50 +01:00
libretroadmin
963bb92f95 (Input) Style nits/code simplifications 2023-02-19 06:30:14 +01:00
libretroadmin
41b069462d (Android) Buildfix 2023-01-07 12:10:17 +01:00
libretroadmin
e447a4e8e6 Get rid of RARCH_CTL_SET_{IDLE/PAUSED} 2023-01-07 07:32:16 +01:00
Gonzalo Peche
9efc1f500d In Android builds, add input_android_physical_keyboard configuration option and its corresponding menu entry to force a device to act as a physical keyboard.
When running on Android, RetroArch considers most devices that emit dpad events as gamepads, even if they also emit other keyboard events; this is usually the right thing to do, but it has the side effect of not letting some actual keyboards (e.g.: Logitech K480) act as such inside RetroArch. This configuration option allows users to manually select a specific input device to act as a physical keyboard instead of a gamepad, which is handy when emulating computers as opposed to consoles.
2023-01-05 04:50:37 +01:00
libretroadmin
6a098d37ac Use HAVE_DYLIB instead of HAVE_DYNAMIC when loading shared libraries 2022-11-21 05:37:35 +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
da68e73f94 Get rid of some RARCH_CTL_ commands 2022-10-10 20:14:54 +02:00
LibretroAdmin
d0c6dfee0b Cleanup bitmask setting 2022-10-05 18:43:58 +02:00
libretroadmin
14afdf0e87 (Android) Backport 2020e9ce6a -
* Gingerbread support
* Touchpads support
* builtin Xperia Play autoconfig profile
2022-07-08 21:03:19 +02:00
Vladimir Serbinenko
2ef2ff1b36 Add a configurable workaround for Android reconnecting devices
Closes https://github.com/libretro/RetroArch/issues/3414

I have investigated the issue. The crux of the problem is that on Android there
is no way distinguishing 2 scenarios:
1) 2 identical bluetooth controllers A and B and first there are button presses
only on controller A and then on controller B
2) the same controller disconnects and reconnects.
Android doesn't give bluetooth mac address of where the touch came from, only
opaque ID and this opaque ID changes after reconnect. Hence without changes to
android this is infeasible without giving up the ability for 2 users to play on
identical controllers.

I guess that this sacrifice makes sense for affected users
2022-04-05 18:40:27 +02:00
Aaron Ramirez
97f3fca139
Fixes a bug where the Gyroscope and Accelerometer would not be re-enabled when the app regains focus or is resumed. (#13298) 2021-11-29 16:53:13 +01: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
twinaphex
e886e908d5 Create consistent naming conventions - use retroarch_ instead
of rarch_ for some functions for all functions coming from retroarch.h
2021-09-28 12:56:10 +02:00
Mark W. Kidd
5f834a8cb3 input_driver refactor 2021-08-19 20:02:39 -04:00
Autechre
ae327a769b
Revert "input refactoring: create input_driver.c" 2021-08-18 18:45:53 +02:00
Mark W. Kidd
5a8920c862 input_driver refactor 2021-08-17 08:56:29 -04:00
Mark W. Kidd
f74fddf3fd do not duplicate port 0 mouse and gun inputs to other ports 2021-06-09 17:20:13 -04:00
jdgleaver
34e08a688f (Sensors API) Android (crash-)fixes/improvements + add option to disable sensor input 2020-09-14 17:52:45 +01:00
twinaphex
3f566fd54e Don't implement input_state for input drivers that don't need it 2020-09-02 17:37:01 +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
0adee503f2 (Android) Don't do memcpy copy anymore 2020-08-31 03:11:52 +02:00
twinaphex
202e460be7 (Android) Simplify code 2020-08-31 02:54:12 +02:00
twinaphex
0cb0a08923 (Android) Buildfix 2020-08-31 02:17:18 +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
1e223733fc Add joypad_rumble function in Android joypad driver 2020-08-29 23:47:56 +02:00
twinaphex
b48b751a3c Rewrite set_rumble function 2020-08-29 23:33:13 +02:00
twinaphex
0d9b2eef4f (Android) Buildfix #2 2020-08-29 22:50:51 +02:00
twinaphex
cd972e0e4e (Android) Buildfix 2020-08-29 22:47:38 +02:00
twinaphex
2b393e2425 move input_key_pressed to retroarch.c 2020-08-29 22:09:29 +02:00
twinaphex
b3744c3126 Put input_jpyad_init_driver last in 'input' callback function 2020-08-29 20:46:42 +02:00
twinaphex
e6b9420a15 (Input) reorder structs, alignment 2020-08-26 15:32:05 +02:00
twinaphex
968ec1f4b1 (Android) Silence warning 2020-07-23 03:59:37 +02:00
twinaphex
d97e590aaf Reimplement multi button state functions 2020-07-19 03:18:12 +02:00
twinaphex
cb5b22b6ac (Android) Refactor axis functions 2020-07-18 22:38:23 +02:00
twinaphex
601a73fa8b Use string_starts_with_size where possible - avoids the strlen 2020-06-25 12:51:04 +02:00
twinaphex
a2b83636d7 (Android) Some slight optimizations 2020-06-24 13:27:32 +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
d998f86f1f Cleanups 2020-06-12 18:41:09 +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
dee0c5dbca CTR buildfix + cleanups 2020-06-11 19:33:27 +02:00
twinaphex
9c1d40c364 (Android) Buildfix 2020-06-11 17:37:23 +02:00
twinaphex
6ddbf911e3 (SDL input) Build fix - and further cleanups in other
drivers
2020-06-11 17:12:08 +02:00
twinaphex
5d58acd2c0 (Android) Input driver optimizations - fill in device_model one time
inside the init function - mistake previously was putting it erroneously
inside an inner loop
2020-06-11 08:08:21 +02:00
twinaphex
108bbf0bf6 Turn this into static function 2020-06-11 07:12:54 +02:00