Commit Graph

264 Commits

Author SHA1 Message Date
Autechre bd937eb49f
Merge pull request #12536 from grant2258/udev
only add mouse if it has buttons and add vebose device friendly names
2021-06-22 17:23:19 +02:00
Autechre 6986caed5b
Merge pull request #11388 from pjft/dual-lightgun
Change udev driver for dual lightgun support in X11
2021-06-21 18:06:35 +02:00
Grant 6e2709d62a cleanup 2021-06-19 08:47:35 +01:00
Grant eef86d5f72 fix game focus mode 2021-06-19 07:59:06 +01:00
Grant 863aaa5b9d Revert "fix game focus mode on udev as well"
This reverts commit 54eed63418.
2021-06-19 07:44:02 +01:00
Grant 54eed63418 fix game focus mode on udev as well 2021-06-19 07:00:09 +01:00
Grant 7915b040a9 only add mouse if it ha buttons and add vebose device friendly names 2021-06-18 03:55:25 +01:00
David Carlier 3b7e0a8db1 FreeBSD build fix proposal 2021-05-01 15:37:14 +01:00
twinaphex cfe9d60f51 Get rid of button_is_pressed 2021-04-15 06:55:35 +02:00
twinaphex f1cf5ceb82 (input drivers) Cut down on code duplication 2021-04-11 16:31:46 +02:00
twinaphex 05a2623875 (udev input) Cut down on code duplication 2021-04-11 06:37:49 +02:00
twinaphex ca5ce839ce Small cleanups to button input handling code - several parameters
were no longer used
2021-04-10 19:06:56 +02:00
pjft 0a83817f25
Merge branch 'master' into dual-lightgun 2021-01-18 11:23:44 +00:00
twinaphex 22e966be5b Cleanups 2020-12-09 22:25:05 +01:00
jdgleaver 3fa1166ec4 (udev/linuxraw/wayland) Fix return key keyboard input 2020-09-29 11:23:35 +01:00
pjft f8b4289811 Change udev driver for dual lightgun support in X11 2020-09-28 21:25:51 +01: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
Autechre 87e35d56ae
Merge pull request #11264 from libretro/refact-joypad
Refactor joypad/input drivers
2020-08-31 20:04:18 +02:00
twinaphex 6b756986d5 (UDev) Buildfix for platforms that don't define UDEV_XKB_HANDLING 2020-08-31 14:04:36 +02:00
twinaphex fe6d047bfe (Udev) Cleanups 2020-08-31 03:38:51 +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 5f08605680 Refactor joypad drivers 2020-08-30 05:29:32 +02:00
twinaphex 721b3039e4 (UDev) Buildfix 2020-08-30 04:52:00 +02:00
twinaphex a244a39626 Cleanups 2020-08-30 00:25:21 +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 2509a75477 (Udev) Code de-duplication 2020-07-19 05:07:50 +02:00
twinaphex d97e590aaf Reimplement multi button state functions 2020-07-19 03:18:12 +02:00
twinaphex 3297e464c4 (Input) Optimize input bitmask codepath 2020-07-14 01:39:07 +02:00
Ben Klopfenstein 17465462b8 X11 lightgun support 2020-06-26 19:47:43 -06: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 52ff31f877 Get rid of udev_is_pressed 2020-06-13 01:54:22 +02:00
twinaphex 4a91b11806 Further input driver standardization 2020-06-12 18:28:07 +02:00
jdgleaver 2c956fbe85 (X11/udev) When fetching RETRO_DEVICE_ID_JOYPAD_MASK, only query keyboard if corresponding gamepad button is not pressed 2020-06-12 16:06:32 +01:00
jdgleaver 321ede2256 (X11/udev) Input fixes 2020-06-12 14:12:22 +01:00
twinaphex 255794d903 (Udev) buildfix 2020-06-11 21:40:37 +02:00
twinaphex d1d8386343 (udev) Cleanups 2020-06-11 21:38:58 +02:00
twinaphex dee0c5dbca CTR buildfix + cleanups 2020-06-11 19:33:27 +02:00
twinaphex f12ac35438 Cleanups 2020-06-11 19:03:50 +02:00
twinaphex 6ddbf911e3 (SDL input) Build fix - and further cleanups in other
drivers
2020-06-11 17:12:08 +02:00
twinaphex 703cc7198d (input drivers) cleanup log spam 2020-06-11 05:37:40 +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 4a7dfba6ee
Merge pull request #9540 from SindenLightgun/master
Fixed bug with touchscreen/lightgun
2019-10-01 19:24:22 +02:00
SindenLightgun 2e480a37ea
Fixed bug with touchscreen/
From my analysis I "believe" this is a development bug/typo and is causing issues with mouse and touchscreen input, that would affect touchscreen and lightgun APIs.
2019-10-01 12:26:13 +01: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 e1613bba6d Cleanups 2019-07-12 16:24:09 +02:00
arstn 63494f88cd
Update input/drivers/udev_input.c
sure. commited already.

Co-Authored-By: Rob Loach <robloach@gmail.com>
2019-07-11 17:25:57 +02:00
arstn c222e6674a Making mouse pointer working in X11 environment with no Display 2019-07-11 09:24:01 +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 51365ed387 (input drivers) More simplifications 2019-06-23 02:34:35 +02:00
twinaphex d50a6b6bd2 Add video_driver_has_focus 2019-06-20 06:26:29 +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
Zoran Vuckovic 2b2903cfff Fix issue #8326 2019-02-28 21:56:38 +01: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 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
orbea 2b0838ac02 udev: Disable the mouse when the window has lost focus. (#7851)
Fixes https://github.com/libretro/RetroArch/issues/5520

v2: Move check to udev_handle_mouse().
v3: Change check to udev_get_mouse to fix issue reported by RobLoach.
2019-01-05 19:56:41 -05:00
Greg V a838582b11 udev: support on FreeBSD via libepoll-shim/libudev-devd 2019-01-01 03:16:33 +03:00
grant2258 3a0c27e753 use none zero as requested 2018-12-17 00:07:00 +00:00
grant2258 74de0ade03 resolve changes 2018-12-16 20:52:15 +00:00
grant2258 fd6856ce20 fix tpouchpad as well 2018-12-12 18:27:29 +00:00
grant2258 1d8dd133b7 tidy code up 2018-12-12 17:29:31 +00:00
grant2258 07b17059f1 fix udev mouse 2018-12-11 23:24:21 +00:00
twinaphex 13431c7cbf (udev) Fix game focus toggle for udev input driver 2018-07-15 14:20:26 +02:00
Brad Parker 039da3bb83 C89 buildfix 2018-02-06 22:17:32 -05:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01:00
David Walters c76545bf6c Compile fix. 2018-01-11 17:03:18 +00:00
David Walters 3dc3534498 Merge branch 'master' of https://github.com/libretro/RetroArch into udev_lightgun_api 2018-01-08 14:37:05 +00:00
twinaphex 69f85556a3 Get rid of meta_key_pressed 2017-12-18 05:59:57 +01:00
twinaphex 7b210ccf37 Don't call meta key pressed if not bound 2017-12-18 05:49:17 +01:00
David Walters cbfdd7bbd9 udev lightgun fixes 2017-12-03 09:40:36 +00:00
David Walters c453675d38 lightgun support in udev 2017-12-02 13:24:17 +00:00
twinaphex 6c69002ab4 Start adding not-complete kqueue codepaths - bparker - see if you can
finish this up
2017-11-30 07:28:59 +01:00
twinaphex 62280439b7 Rename epfd to fd 2017-11-30 07:00:25 +01:00
Zoran Vuckovic 5c46e176d5 Add keyboard/mouse device index logging 2017-10-07 06:59:45 +02:00
Zoran Vuckovic 12d0f4107a Use int32_t instead of __s32 2017-10-05 10:00:20 +02:00
Zoran Vuckovic 135b636bd4 Add "absolute" mouse support 2017-10-05 05:18:53 +02:00
Zoran Vuckovic 84d33fb847 Disable keyboard input if window is not active 2017-09-10 05:50:10 +02:00
twinaphex e16371b8a5 Merge input_config.c and input_driver.c 2017-08-31 02:25:04 +02:00
Brad Parker b9036e26a7 fix buffer overflow 2017-07-22 16:08:05 -04:00
Zoran Vuckovic aa99f4f5ba Disable keyboard input and restrict mouse input in some cases 2017-07-18 01:16:48 +02:00
Paolo Bonzini d1dc2e9670 add support for remote control devices and other ID_INPUT_KEY devices
* the remote control presents itself as ID_INPUT_KEY, not
ID_INPUT_KEYBOARD.  However, ID_INPUT_KEYBOARD is a subset of
ID_INPUT_KEY.

* the remote control lacks the backspace and enter keys, which are hard
coded in RetroArch. It has "back" and "ok" instead, so map those to
RETROK_BACKSPACE and RETROK_ENTER as well.

Remote controls also have no ESC key, but that one is customizable
and I used the Power key of the remote (which already has a mapping
to RETROK_POWER).

The functionality provided is really the bare minimum, but it is enough
to teach a kid "press the power button here to watch TV"; compared to
pressing L1+R1+START+SELECT and navigating to the RetroArch's "quit"
menu item, that hopefully has more chances of success.
2017-07-02 10:50:00 +02:00
twinaphex fe829e5eb0 Fix C89_BUILD 2017-06-28 18:01:04 +02:00
Twinaphex 5c5c5ecbdf Revert "udev input: support controlling the menu with a TV remote control" 2017-06-22 20:53:07 +02:00
Paolo Bonzini d5cdbca322 add support for remote control devices and other ID_INPUT_KEY devices
* the remote control presents itself as ID_INPUT_KEY, not
ID_INPUT_KEYBOARD.  However, ID_INPUT_KEYBOARD is a subset of
ID_INPUT_KEY.

* the remote control lacks the backspace and enter keys, which are hard
coded in RetroArch. It has "back" and "ok" instead, so map those to
RETROK_BACKSPACE and RETROK_ENTER as well.

Remote controls also have no ESC key, but that one is customizable
and I used the Power key of the remote (which already has a mapping
to RETROK_POWER).

The functionality provided is really the bare minimum, but it is enough
to teach a kid "press the power button here to watch TV"; compared to
pressing L1+R1+START+SELECT and navigating to the RetroArch's "quit"
menu item, that hopefully has more chances of success.
2017-06-19 15:09:13 +02:00