twinaphex
60eaf14afc
C89_BUILDFIX
2022-01-29 10:55:31 +01:00
Dystopian
0afdb2a0cf
Improve udev logging ( #13549 )
2022-01-29 10:57:38 +01:00
Tomáš Kelemen (vudiq)
0cf437e375
Lakka/Nintendo Switch: disable rumble gain
...
Rumble gain breaks controlls on Nintendo Switch port of Lakka, probably
due to issue in the driver).
Upstream of patch used by Lakka at build time
1943ad296e/packages/libretro/retroarch/patches/retroarch-06-switch_disable_rumble_gain.patch
2021-11-18 00:36:11 +01:00
twinaphex
619398bbe4
Backport parts of 73c0760236
2021-11-09 23:12:57 +01:00
Michael Burgardt
303d17e2e6
Rebase 'Add generic rumble gain to input settings' by davidgfnet
2021-09-08 19:52:32 +02:00
twinaphex
bb30dc3dee
After gblues' change, the rest of the button function callbacks
...
for the other joypad drivers still had int16_t as the return type
instead of int32_t - fix this
2021-08-08 21:48:19 +02:00
amtz
d0612f906d
Limit udev device scan to subsystem 'input'
...
This change makes the call to 'udev_enumerate_scan_devices' much faster.
In particular, for some bluetooth devices, this function may implicitly
read its battery's virtual file 'uevent', e.g.
/sys/devices/*/usb1/1-1/*/bluetooth/hci0/*/power_supply/hid-*-battery/uevent
Reading this file may (for unknown reasons) block up to 10 seconds.
Since udev_enumerate_scan_devices is called 4 times (for keyboard,
mouse, touchpad, and joypad) during startup this may cause a
considerable delay.
Limiting the scan to subsystem 'input' yields the same devices but makes
the scan faster and does not read 'uevent' of the input controller's
power_supply.
2021-08-02 13:17:00 +02:00
David Lawson
0bdf574cfd
udev_joypad: make rumble work
...
Rumble was not working for me. I learnt a bit about how evdev works and it seems like you need to set a replay which defines how long the effect is (previously we set it to 0). This means there's a maximum length to the rumble effect which feels wrong.
When we do `play.value = !!strength;` we're setting the number of times for the effect to repeat, which works fine because the effect stops when we set it to 0.
It doesn't feel quite right to me playing e.g. Goldeneye but I've not played on real hardware for a while.
I'm hoping someone is more familiar with evdev and can suggest a better approach.
2020-12-31 07:55:02 +00:00
David Lawson
b0de18ea12
udev_joypad: some cleanup
2020-12-30 22:07:26 +00:00
David Guillen Fandos
bf48757a2e
Add support for 64 buttons in udev gamepads
...
It seems only 16 were only really supported anyway due to the
usage of BITS_COPY16_PTR (which only copies 16 bit states)?
2020-11-18 19:29:46 +01:00
jdgleaver
3fa1166ec4
(udev/linuxraw/wayland) Fix return key keyboard input
2020-09-29 11:23:35 +01:00
twinaphex
236622ffa6
(Joypad driver) Init function - return void pointer
2020-09-22 02:30:47 +02:00
twinaphex
99cff42988
(udev_joypad) Struct reordering, alignment
2020-09-11 15:53:18 +02:00
twinaphex
88a93b0053
Cleanups
2020-08-28 19:59:31 +02:00
twinaphex
4676e102d0
(input/drivers_joypad) Add TODO/FIXME notes
2020-08-03 17:31:22 +02:00
twinaphex
ed3ee2511f
Cleanups - add local variable
2020-07-29 05:31:23 +02:00
rsn8887
78c9dbbd20
Fix input port assignments
2020-07-28 16:35:16 -05:00
twinaphex
897a9de5be
(drivers_joypad) Cleanup axis functions
2020-07-19 18:51:05 +02:00
twinaphex
285b0ec0bb
Buildfix
2020-07-19 03:20:41 +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
Autechre
f8d6cea02a
Update udev_joypad.c
2020-07-18 21:56:27 +02:00
twinaphex
08ad00f5d3
Start preparing for being able to grab multiple buttons at the same time
2020-07-18 19:51:14 +02:00
twinaphex
8b078662cd
Change function signature of joypad driver's 'button'
2020-07-18 18:07:57 +02:00
jdgleaver
84a71ea133
Rewrite 'task_autodetect.c': Ensure thread safety + clean-ups/rationalisation
2020-07-14 17:46:58 +01:00
twinaphex
79cc4f9c4f
Revert "Start going through wrapper functions for access to input_device_names"
...
This reverts commit 92293525c130f202604bcf078f38426c7090d2e0.
2020-07-05 16:41:55 +02:00
twinaphex
92293525c1
Start going through wrapper functions for access to input_device_names
2020-07-05 10:33:21 +02:00
twinaphex
b363ed7d79
(drivers_joypad) get rid of excessive logging
2020-06-11 04:06:33 +02:00
twinaphex
ad1aa59ce1
Cleanup != NULL comparisons
2020-05-19 21:15:06 +02:00
twinaphex
f06607141d
dinput_joypad_button - further cleanups
2019-07-23 18:37:28 +02:00
twinaphex
0257e01bee
Refactor input_autoconfigure_connect - don't return
...
value - set input device name upon failure implicitly
2019-07-16 15:28:22 +02:00
David Skywalker
89645ac296
fix wrong udev devices order, fixes #9071
2019-07-08 01:27:41 +02:00
orbea
28ff4b391a
Clean up white space.
2019-02-03 16:00:50 -08:00
orbea
5d56080312
Use the posix poll.h instead of sys/poll.h.
2019-02-01 09:58:04 -08:00
orbea
ff2e3bbbce
Fix CXX_BUILD errors.
2019-01-13 11:51:33 -08:00
orbea
bfc366decc
Squeeze extra blank lines with cat(1).
...
Example:
find . -type f -iname '*.c' | while read -r i; do
cat -s "$i" > "$i.new"
mv "$i.new" "$i"
done
2019-01-08 11:04:58 -08:00
Greg V
a838582b11
udev: support on FreeBSD via libepoll-shim/libudev-devd
2019-01-01 03:16:33 +03:00
mickski56
aa0e0de1d9
address #6920 Proper analog trigger support
2018-07-24 22:48:50 +01:00
twinaphex
a82bb0ec94
Create special type input_bits_t
2018-04-08 20:21:12 +02:00
David Demelier
e99049a8ff
Use EVIOCGID's ioctl to get vendor/product id, #6325
...
The current code get the USB vendor/product controller, in case of
bluetooth connection this means that you get the bluetooth dongle ids
instead of gamepads. This is not fine as we match gamepads using their
product and vendor ids.
Credits go to SDL which helped me to figure out this issue.
http://hg.libsdl.org/SDL/file/f7c6b974d5af/src/joystick/linux/SDL_sysjoystick.c#l208
2018-02-23 09:19:43 +01:00
twinaphex
61ff51be2f
Start using string_is_equal predominantly
2018-01-16 22:53:38 +01:00
gblues
0f7de204f7
Last batch of whitespace cleanup (post-rebase)
...
-- looks like a few files committed with DOS line endings
2017-12-12 00:24:46 -08:00
twinaphex
c950613098
C comments
2017-12-11 11:28:48 +01:00
Peter Y. Hammond
b14598657c
Fixed a bug where the joypad devices were not always being assigned in the same order as they were numbered under /dev/input/. This showed up mainly when using an external USB Bluetooth dongle. In that case, controllers would be assigned often in reverse order.
2017-12-10 22:22:01 -07:00
twinaphex
f0c143766e
Change to 256bit macros
2017-12-05 12:07:35 +01:00
twinaphex
6c09661a64
Move defines to retro_miscellaneous.h
2017-12-05 10:42:37 +01:00
twinaphex
e94300a581
Get rid of a lot of RARCH_INPUT_STATE_BIT_ macros - replace them
...
with BIT128_ equivalents instead
2017-12-05 09:22:56 +01:00
David Walters
c5bdc02d6f
replace uint64_t with retro_bits_t* for pad buttons state
2017-11-28 10:04:34 +00:00
twinaphex
e16371b8a5
Merge input_config.c and input_driver.c
2017-08-31 02:25:04 +02:00
twinaphex
c70526b7af
Fix hotplug regressions with udev
2017-06-10 11:58:22 +02:00