Commit Graph

1197 Commits

Author SHA1 Message Date
twinaphex a739003ad4 Buildfix 2019-06-23 19:08:03 +02:00
twinaphex 9c73d3305d Insert input_joypad_pressed into drivers themselves 2019-06-23 18:20:48 +02:00
twinaphex 7a2fa44c4b (Cocoa) Add bitmask code 2019-06-23 17:05:01 +02:00
twinaphex 9e20871c3c (Wayland) Buildfix 2019-06-23 16:37:23 +02:00
twinaphex 439a07eecd (Android) Put extra parentheses around this 2019-06-23 15:56:34 +02:00
twinaphex 334c64d159 (Android) Simplify input code 2019-06-23 15:55:40 +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 d4ed0358a7 (dinput.c) Cleanups 2019-06-23 03:14:21 +02:00
twinaphex 51365ed387 (input drivers) More simplifications 2019-06-23 02:34:35 +02:00
twinaphex ceecf4751a Simplify DOS keyboard code 2019-06-23 02:22:54 +02:00
twinaphex e51a98a295 Simplify android input code 2019-06-23 01:57:12 +02:00
twinaphex 20e8dfcba5 (dinput/xinput) Simplifications 2019-06-21 09:00:59 +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
Yoshi Sugawara 2dde223d23 Support returning the number of touches in the current input to support multi-touch inputs, like using a 2 finger touch to reload or secondary fire in lightgun games 2019-06-11 11:49:27 -10:00
rsn8887 28ef222886 [VITA] Bluetooth mouse and keyboard support 2019-03-22 21:32:59 -05: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
Brad Parker 145013074e android buildfix 2019-03-14 21:26:39 -04:00
Brad Parker 15e489fd0a android: allow stylus/pen to move mouse without pressing down 2019-03-14 19:33:51 -04:00
Brad Parker 2f659e3e17 style nits 2019-03-14 19:33:02 -04:00
Twinaphex a8a7fba2ca
Merge pull request #8450 from Exvat/switch-rumble
Add rumble support for the switch
2019-03-13 12:28:05 +01:00
Twinaphex ae35484eea
Merge pull request #8456 from phcoder/kbd
Fix keyboard on android
2019-03-13 11:35:27 +01:00
Brad Parker 44a06d69a6 android: add gamepad rumble support 2019-03-13 03:32:18 -04:00
Vladimir Serbinenko fa1603127f Fix keyboard on Android
This bug interferes with my BK-0010 libretro port.
2019-03-12 23:45:52 +01:00
Brad Parker 954c54baee add device vibration option for cores that support rumble (with initial android implementation) 2019-03-12 13:07:16 -04:00
Exvat e7bf2a345c Add rumble support for the switch 2019-03-11 19:33:02 -07:00
Brad Parker f6dc7f4f02 android: add option to vibrate on touch 2019-03-10 21:36:52 -04:00
Zoran Vuckovic 2b2903cfff Fix issue #8326 2019-02-28 21:56:38 +01:00
radius b549f5181b try to fix #8121 by making the interval configurable 2019-02-07 22:34:18 -05:00
orbea 28ff4b391a Clean up white space. 2019-02-03 16:00:50 -08:00
twinaphex 85708b7ef8 (Emscripten) Buildfixes 2019-02-03 17:15:18 +01:00
orbea 5d56080312 Use the posix poll.h instead of sys/poll.h. 2019-02-01 09:58:04 -08:00
David Skywalker 347519a4d8 now X11 driver using keycodes instead keysyms, fixes international layouts problems. 2019-01-31 12:50:58 +01:00
orbea e062b98088 Remove trailing blank lines.
find . -type f -exec sed -i '${/^[[:space:]]*$/d;}' {} \+
2019-01-17 19:39:38 -08:00
krzys-h e65f87a4ee Fix warning in uwp_input.c 2019-01-13 16:01:59 +01:00
krzys-h e08f79e16b (UWP) Add keyboard mapping support in the uwp driver 2019-01-11 20:24:26 +01:00
twinaphex b9ff2e4de1 Fix some static code analysis warnings from MSVC 2017 2019-01-10 21:47:15 +01:00
krzys-h 0cff7eefa7 Initialize COM only once, globally 2019-01-10 16:48:02 +01:00
Twinaphex 40997473ed
Merge branch 'master' into orbis2 2019-01-08 20:18:08 +01: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
Twinaphex 8f2fa4527c
Merge pull request #7849 from krzys-h/fix-7842
Fix the taskbar extension not initializing properly
2019-01-02 02:34:19 +01:00
krzys-h 9c75b9cb7f Add missing CoUninitialize calls, fix COM initialization problems
It turns out, some of the CoInitialize calls were failing because they
specified conflicting threading models
2019-01-01 17:30:43 +01:00
Greg V a838582b11 udev: support on FreeBSD via libepoll-shim/libudev-devd 2019-01-01 03:16:33 +03:00
Francisco José García García 4ad083cb97 [ORBIS] Update input driver 2018-12-30 14:00:18 +01:00
Francisco José García García 9c5a934529 [ORBIS] Untested input driver 2018-12-30 01:29:34 +01:00
krzys-h f6c8a0c5c2 Add UWP input driver
Keyboard, mouse and touch support: done
2018-12-28 22:09:30 +01:00
Francisco Javier Trujillo Mata 90ba2df972 Put proper license in the files for the PS2 development 2018-12-26 13:48:48 +01: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
Royerson ba435ce22a
add more model names for Xperia Play hack 2018-11-21 14:06:34 -07:00
radius 390c9a4dde xperia play hack 2018-11-18 17:34:54 -05:00
Francisco Javier Trujillo Mata 8a0266cf8d PS2 Input looks to be ready 2018-11-09 22:40:50 +01:00
Francisco Javier Trujillo Mata 0880bd00b0 PS2 is compiling with null drivers 2018-11-09 22:40:50 +01: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 ae0d9fd60d (Wayland) Buildfixes 2018-08-17 17:42:14 +02:00
Twinaphex 4d96fddf5e
Merge pull request #7061 from wiktorek140/sailfishos-touch
Sailfish OS  device build configuration connected with touch screen support required for device with this OS
2018-08-15 13:30:04 +02:00
twinaphex a6941fb4ed Initial work done on VS2017 solution for Android 2018-08-14 16:02:31 +02:00
Wiktor Strzębała 45799ee034 Bring up touch support for wayland subsystem for sailfish os devices
Touch code cleanup
Make variabled static as suggest bparker06
C89 compilation error fix (at least for loops)
More C89 fixes

Signed-off-by: Wiktor Strzębała <wiktorek140@tlen.pl>
2018-08-09 20:49:27 +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
twinaphex 9a1ac6d77b (rwebinput) Fix game focus toggle 2018-07-15 14:22:16 +02:00
twinaphex 13431c7cbf (udev) Fix game focus toggle for udev input driver 2018-07-15 14:20:26 +02:00
twinaphex 98190294db (winraw_input) Fix game focus toggle for winraw_input 2018-07-15 14:18:35 +02:00
twinaphex d50850762b Fix game focus toggling for DInput driver 2018-07-15 14:17:10 +02:00
radius 717e45dc52 Add mouse wheel support
enable hold to bind on android

cleanup
2018-06-29 21:12:47 -05:00
radius fef9b63bc0 Revert "Disable ENABLE_TOUCH_SCREEN_MOUSE for now until issues are resolved"
This reverts commit 2b02616512.
2018-06-29 21:12:47 -05:00
twinaphex 981b0eec91 Take this out 2018-06-19 06:28:38 +02:00
twinaphex 54a95eed83 These defines are not available on Android NDK APIs lower than 24 2018-06-18 01:56:22 +02:00
gblues fb5b31faf3 Merge branch 'master' into gblues/hid 2018-04-14 14:18:03 -07:00
twinaphex a82bb0ec94 Create special type input_bits_t 2018-04-08 20:21:12 +02:00
gblues 8a4c5086fb Finish HID implementation for WiiU GCA adapter
== DETAILS

(I think)

- Uncomment the call in the read loop to start feeding packets to the
  driver
- implement the GCA packet driver
- implement the pad interface
- fix indentations in GCA driver

== TESTING
Compiles. Haven't tested yet.
2018-03-29 23:37:11 -07:00
Ash aeea0e6ca8
[WiiU] Fix OOB read/write in keyboard driver
This code used a keyboardState size of 256 and indexed it with a
retro_key, which can be any value (RETROK_RALT is 307). This fixes
that by using RETROK_LAST as the array size.

Should fix #6322.
2018-03-17 13:00:47 +11:00
twinaphex 2b02616512 Disable ENABLE_TOUCH_SCREEN_MOUSE for now until issues are resolved 2018-02-15 14:50:14 +01:00
Brad Parker 039da3bb83 C89 buildfix 2018-02-06 22:17:32 -05:00
aliaspider 5db96f35fa (WIN32) various build fixes. 2018-01-20 20:05:32 +01:00
twinaphex 897c1654ab Reduce usage of string_is_not_equal_fast 2018-01-17 01:03:48 +01:00
twinaphex 61ff51be2f Start using string_is_equal predominantly 2018-01-16 22:53:38 +01: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
Toad King 21d928ba0e add joypad driver for emscripten 2018-01-14 00:15:30 -06:00
Toad King 38ec1acf8e add mouse support to emscripten 2018-01-13 20:51:30 -06:00
Toad King 0ce1fa7751 fix search box in menu 2018-01-13 20:47:15 -06:00
Toad King 1e212b4248 use emscripten HTML5 API for keyboard events instead of old JS library 2018-01-13 17:56:00 -06:00
Toad King a77f9c37c6 start on bringing the emscripten video code up to speed with latest emscripten
fix rwebinput
2018-01-13 00:05:07 -06: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
radius 3ee75e86c5 ake the hack less specific 2018-01-06 13:47:54 -05:00
gblues 5b13f85967 Use the right value for BIT256_GET macro
== DETAILS

The BIT256_GET() macro expects a bit number (from 0-255), and we're giving it
a 32-bit mask (0x000080000).

Solution:

- Define VPAD_BUTTON_xxx_BIT macros using the bit number
- Use said macro in wiiu_input.c
- organizational cleanup:

  * put VPAD_BUTTON_TOUCH into the enum in stead of as a hokey define
  * put the touch bits in the right order
  * put in placeholder enums for (currently) unused bits
2018-01-05 20:03:10 -08:00
Brad Parker 8a8687ec9c add missing ifdef for device change fix and include 2K in the version check 2017-12-30 23:07:59 -05:00
misson20000 7cc614263a (NSW) add default button bindings and fix right joystick 2017-12-31 03:04:11 +01:00
gblues 0ae7ffe0d3 Clean up dumb compile warnings, fix crash bug
== DETAILS

- the free() method of the hid_driver_t interface needs its
  parameter defined as const in order for the compiler to stop
  complaining about losing const-ness.
- if a joypad list is created with <MAX_USERS slots in it, the
  destroy() function will crash because it assumes there are MAX_USERS
  entries.

  To do this, the allocate function creates n+1 slots, and gives the
  last slot a canary value that the destroy() method can then watch for
  when iterating through the list.
2017-12-30 04:43:27 +01:00
gblues 5b37ced196 Update HID pad driver architecture
== DETAILS

The current HID implementation assumes a very low-level USB library
is being used. This causes a problem on Wii U, because the Cafe OS
only exposes a high-level interface.

To get these functions exposed to the HID pad drivers, I had to make
three changes:

1. I added the legacy "send_control" function to the HID driver
   interface
2. I modified the signature of pad_connection_pad_init() to send the
   driver pointer instead of the function pointer
3. I updated the HID pad drivers to keep the pointer to the driver
   instead of the function pointer, and updated the calls into the
   send_control function as appropriate
4. I updated the HID drivers to use the new pad init signature

== TESTING
Untested, in theory it should work without a hitch because at this
point all I've done is abstract things a little. I still need to
update the HID pad drivers to use the Wii U-specific calls as
appropriate.
2017-12-30 04:41:01 +01:00
gblues c1496a8600 WIP - reorganizing input data
== DETAILS

Looking at the apple input driver gave me an idea--moving the
HID driver into the wiiu_input_t data instead of piggy-backing
it off the wiiu_joypad driver.

- Remove changes to wiiu_joypad
- Add equivalent to wiiu_input

This is probably broke as hell. Haven't tried to compile.
2017-12-30 04:40:43 +01:00
twinaphex 5c876647ed (NSW) Small cleanups 2017-12-29 00:45:00 +01:00
misson20000 6d2a7b1f26 Nintendo Switch (libtransistor) port 2017-12-29 00:10:01 +01:00
radius 2cab3a7e4e fix some nits 2017-12-27 15:43:03 -05:00
radius c3e6ac96aa only reinit when HID devices are attached 2017-12-27 15:34:18 -05:00
radius ab54fda509 avoid dinput reinitialization on unrelated WM_DEVICECHANGE events 2017-12-26 20:17:26 -05: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
gblues 6904101c44 Clean up trailing whitespace
== DETAILS

Really simple code cleanup, because my editor flags trailing whitespaces
and it's pretty annoying.
2017-12-12 00:24:18 -08:00
bparker06 4c9bde61b5
dinput: fix memory leak of joypad name 2017-12-05 13:54:15 -05:00
twinaphex f0c143766e Change to 256bit macros 2017-12-05 12:07:35 +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 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 5f0a9fffbb
Merge pull request #5827 from hiddenasbestos/input_driver_x11
Add new lightgun/mouse-bind features to X11 driver
2017-12-02 09:18:17 +01: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
David Walters 5f095677a7 fix for wiiu build (#5826) 2017-11-29 15:55:31 -05:00
David Walters 7dfcc169de Add new lighgun/mouse-bind features to X11 driver 2017-11-29 18:32:58 +00:00
David Walters f09477d46a additional compile fixes 2017-11-28 10:36:16 +00:00
David Walters e06290a06c updated winraw driver for new lightgun/mouse binding api 2017-11-27 12:51:06 +00:00
David Walters 59c188f75c Implement new lightgun API 2017-11-26 17:09:15 +00:00
David Walters cdb5a656f2 dinput: only support hardware mouse index 0 2017-11-26 15:40:27 +00:00
David Walters 9682e2777b support for mouse button binds in Windows input drivers 2017-11-26 12:55:17 +00:00
David Walters 41df4a0555 Support for mouse buttons 4&5 2017-11-17 12:00:24 +00:00
Ash a3e4a7612f
[WiiU] Fix DRC touch - proper scaling; press detection
Oops! Didn't do this quite right the first time round.
This commit fixes RETRO_DEVICE_ID_POINTER_PRESSED, which would always
return 0 due to to an implicit case to int16_t. Basically, we'd do
(val & 0x00080000) & 0xFFFF; which would return 0 every time. Fixed that
by wrapping it in a ternary. Yes, I know we could use a rotation, but
for a boolean value it really doesn't matter.
I also rewrote scaleTP to deal entirely in integers. While the
floating-point math was theoretically faster on PowerPC; it gets awkward
to cast -0x7FFF to a float.
Speaking of, the driver now actually conforms to the libretro API. Not
sure how I managed to not see the spec; but hey, now its fixed.
RETRO_DEVICE_POINTER_ID_X/Y will now return values between -0x7FFF and
0x7FFF like they're supposed to.

Big thanks to @r-type for hounding me to fix this.
Partially addresses #5294; we still need mouse emulation.
2017-11-04 15:01:58 +11:00
Twinaphex affd56f293 Merge pull request #5515 from casdevel/winraw-lightgun
Add lightgun device capability
2017-10-09 02:42:09 +02:00
Zoran Vuckovic 5c46e176d5 Add keyboard/mouse device index logging 2017-10-07 06:59:45 +02:00
Zoran Vuckovic 082629ccd5 Add lightgun device capability 2017-10-06 08:19:22 +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
twinaphex cf9ab18cab (360) Buildfix 2017-10-03 04:21:25 +02:00
twinaphex d10de20bff Start compiling Griffin as C for 360 - C89 fixes 2017-10-03 04:11:41 +02:00
twinaphex ff48af4d06 Update 2017-09-28 18:57:00 +02:00
twinaphex 9eba2c8e39 Fix CXX_BUILD on Windows 2017-09-28 18:53:09 +02:00
twinaphex a3ded01b64 Cleanups 2017-09-27 23:16:37 +02:00
Zoran Vuckovic d47de4b17e Fix mouse "absolute" move handling 2017-09-12 12:36:27 +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
Ash 6b5aef09a1
[WiiU] DRC touch support as pointer device
Allow using the Gamepad's touch screen as a RETRO_DEVICE_POINTER.
Methodology could use some work, had to add an extra axis to
joypad in order to get the data transferred into the input driver.
Feel free to change this.
Needs to emulate RETRO_DEVICE_LIGHTGUN to really be useful.
Potential for Wiimote IR in future.

Partially addresses libretro/RetroArch#5294
2017-08-19 17:40:56 +10:00
twinaphex ae2435cf16 Silence some more C89_BUILD warnings 2017-08-12 18:15:26 +02:00
twinaphex 5101895cc9 (dinput) Buildfix 2017-08-09 16:53:06 +02:00
twinaphex 4e49155147 Cleanup 2017-08-09 15:54:24 +02:00
twinaphex ee275c85d8 (dinput.c) Cleanups 2017-08-09 15:51:27 +02:00
twinaphex ca80f13b2b Try to be somewhat safer here in case of null pointer derefences 2017-08-09 02:42:19 +02:00
radius f5360d0d82 extra devices 2017-08-04 01:17:32 -05:00
radius 2ef75cb300 buildfix 2017-08-04 01:11:31 -05:00
radius a6b24b4d42 fire tv hack 2017-08-04 01:09:05 -05:00
Zoran Vuckovic 2a92b22128 Add mice info log 2017-07-28 13:03:26 +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
Brad Parker e067dac2a4 fix keyboard regression with mupen cores 2017-07-08 17:39:29 -04:00
twinaphex dc521b42d1 Cleanup 2017-07-05 11:55:17 +02:00
twinaphex ffc393cafc Get rid of unused variables 2017-07-02 20:58:32 +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 60296c0b7d Improve logs some more 2017-07-01 04:37:32 +02:00
radius 0a7968761f improve logging 2017-06-30 20:05:30 -05:00
twinaphex fe829e5eb0 Fix C89_BUILD 2017-06-28 18:01:04 +02:00
twinaphex 20e7ac4280 Buildfix 2017-06-26 03:50:34 +02:00
twinaphex 411ade7fb9 Mingw buildfix 2017-06-26 03:47:47 +02:00
Twinaphex 5c5c5ecbdf Revert "udev input: support controlling the menu with a TV remote control" 2017-06-22 20:53:07 +02:00
Twinaphex 8068bcccbe Merge pull request #5076 from bonzini/master
udev input: support controlling the menu with a TV remote control
2017-06-21 23:35:22 +02:00
twinaphex f087419165 Rename platform_linux.c to platform_unix.c 2017-06-19 17:38:49 +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
Brad Parker fca0e52bdd win32: make includes lowercase to fix cross-compilation on linux 2017-06-13 22:25:47 -04:00
twinaphex 1598042e8e (udev) Keyboard should work again in DRM/KMS 2017-06-12 12:09:19 +02:00
twinaphex a41b8bc199 Direct usage of epoll 2017-06-11 20:51:21 +02:00
twinaphex e92feb85af Use epoll functions directly 2017-06-11 20:44:02 +02:00
twinaphex 060753258a Combine input_driver.c and input_keyboard.c 2017-06-11 17:51:12 +02:00
twinaphex 95e588ce0f Fix C89_BUILD 2017-06-10 12:52:45 +02:00
twinaphex 9b13894438 Slightly rewrite input_state for android input driver 2017-06-10 12:48:09 +02:00
twinaphex 34be5566dd (udev fix) This fixes touchpad movement inside the menu 2017-06-10 12:27:22 +02:00
twinaphex 84f5fa1f26 (epoll_common.c) Cleanups; don't use verbosity logging inside 2017-06-10 12:07:01 +02:00
twinaphex c70526b7af Fix hotplug regressions with udev 2017-06-10 11:58:22 +02:00
twinaphex e8c73c6683 Rewrite other input drivers too 2017-06-10 11:22:24 +02:00
twinaphex d32cf4c866 Slightly rewrite input_state implementations of cocoa_input.c
and linuxraw_input.c
2017-06-10 11:09:58 +02:00
twinaphex 37656eed84 (udev_input.c) Rework input_state 2017-06-10 10:58:56 +02:00
twinaphex cea6dbbb6a (wayland) Fix input issue 2017-06-10 08:40:28 +02:00
twinaphex cffe023085 Fix wayland 2017-06-10 08:33:01 +02:00
Twinaphex 6d85e1f0a6 Merge pull request #5045 from casdevel/mice
Add player mouse device selection
2017-06-10 04:13:16 +02:00
Zoran Vuckovic e698e75a51 Adapt touchpad code for multiple mice support 2017-06-09 21:17:11 +02:00
twinaphex 473aed632d Get rid of this 2017-06-09 02:14:48 +02:00
twinaphex 8980f8c1ea Get rid of useless wrapper function epoll_waiting 2017-06-08 21:52:50 +02:00
twinaphex eb08a86647 Get rid of udev_common.c 2017-06-08 21:46:26 +02:00
Zoran Vuckovic 39108f97e9 Add player mouse index handling to winraw input driver 2017-06-08 17:35:34 +02:00
Zoran Vuckovic 44930716ba Add player mouse index handling to udev input driver 2017-06-08 18:49:08 +02:00
twinaphex 5ef8b69c9c (wiiu_input.c) Minor style nits 2017-06-07 21:06:24 +02:00
Zoran Vuckovic ceca89e104 Fix DRM/KMS keyboard handling 2017-06-07 12:25:10 +02:00
twinaphex d9e6cbb065 Simplifications to SDL input driver 2017-06-07 01:45:09 +02:00
twinaphex 59c3f8b06e Cleanups 2017-06-07 01:19:44 +02:00
twinaphex 603d4d0464 (udev/x11) Simplifications 2017-06-07 01:17:55 +02:00
twinaphex 9e93bdbe27 (linuxraw_input.c) simplifications 2017-06-07 01:12:35 +02:00
Twinaphex 3dede6d71a OSX buildfix 2017-06-07 00:35:11 +02:00
twinaphex c3f5c499f3 Simplify cocoa_input 2017-06-07 00:33:03 +02:00
twinaphex afd6a2bec5 Cleanups 2017-06-07 00:10:39 +02:00
twinaphex 604a558382 Get rid of input_wl_is_pressed 2017-06-07 00:09:31 +02:00
twinaphex deb804ab2f (x11_input.c) get rid of this inline function 2017-06-06 23:50:51 +02:00
Zoran Vuckovic d88b76c26f Add L/R virtual keys handling 2017-06-06 13:50:41 +02:00
twinaphex f307135d1d Split up wayland input driver into separate driver; and
improve mouse support for menu
2017-06-06 07:34:33 +02:00
twinaphex 6b3dbff75f Merge input_driver.c and input_joypad_driver.c 2017-06-06 05:56:02 +02:00
twinaphex 0bd998665b Turn this function into static INLINE 2017-06-06 05:38:01 +02:00
twinaphex 007bb0de39 Buildfix 2017-06-06 05:36:12 +02:00
twinaphex 9ebfb36b4e Use rarch_keysym_lut directly 2017-06-06 05:17:25 +02:00
twinaphex e276142be3 (udev_input.c) Cleanup 2017-06-06 04:18:35 +02:00
twinaphex 4f22c3d13e (x11_input.c) Simplifications 2017-06-06 04:15:45 +02:00
twinaphex 15c4f82dec (udev_input.c) Cleanups 2017-06-06 03:59:52 +02:00
twinaphex c3c772a79a (udev) Avoid warning with helgrind - input descriptor -1 is invalid 2017-06-05 05:18:38 +02:00
radius 304a647248 dlopen libandroid from lib64 instead 2017-06-04 21:20:39 -05:00
twinaphex 8b945a103f (udev_input.c) Set st_dev manually 2017-06-04 21:16:35 +02:00
Zoran Vuckovic ab793b92a3 Remove XKBCOMMON code 2017-06-04 07:23:32 +02:00
Zoran Vuckovic 1911aadc19 Remove duplicate keyboard handling 2017-06-04 07:16:57 +02:00
twinaphex 85058fbe5c (udev_input.c) Some cleanups and a runtime check for X11 2017-06-03 18:54:04 +02:00
Zoran Vuckovic 210da4d204 Add ifdef checks for X11-specific code 2017-06-03 18:01:27 +02:00
Zoran Vuckovic 05a90f7f70 Add mouse grab/ungrab feature 2017-06-03 16:26:08 +02:00
Zoran Vuckovic 39a9ac8444 Add pointer handling to fullscreen mode 2017-06-03 12:46:53 +02:00
Twinaphex a8f1831a62 Merge pull request #5010 from casdevel/udev
Add multiple mice support to udev input driver
2017-06-02 16:45:13 +02:00
Zoran Vuckovic f740776105 Fix capabilities report 2017-06-02 09:47:43 +02:00
Zoran Vuckovic 11559f294a Add multiple mice support to udev driver 2017-06-02 07:57:07 +02:00
Zoran Vuckovic 8c9e72aec1 Remove unused code 2017-05-30 21:05:55 +02:00
Zoran Vuckovic 451db1fac5 Add multiple mice support 2017-05-30 05:50:38 +02:00
twinaphex d8d11c5dcc (x11_input.c) Cleanups 2017-05-20 20:57:14 +02:00
twinaphex f83a26c8b0 (udev_input.c) Simplifications 2017-05-20 20:50:23 +02:00
twinaphex 9f6dc975da Simplify udev_input.c 2017-05-20 20:35:42 +02:00
twinaphex 5a9dbf7e4f Merge keyboard files for udev/x11 2017-05-20 19:44:04 +02:00
twinaphex 6fea8f14c5 Call video_driver_cb_has_focus directly 2017-05-20 14:11:50 +02:00
Zoran Vuckovic 25e08cf6c4 Fix one pointer cast warning 2017-05-19 16:48:03 +02:00
twinaphex 59fb7700b8 Combine menu_driver.c and menu_display.c 2017-05-19 15:25:14 +02:00
twinaphex b086b72ff9 (winraw_input.c) Minor cleanups 2017-05-19 12:58:44 +02:00
twinaphex f185c1ef1f (MSVC) Buildfix 2017-05-19 06:30:49 +02:00
Zoran Vuckovic 1bc945e3dc Add Windows raw input driver 2017-05-18 18:48:41 +02:00
twinaphex 126a5bf121 Use string_is_equal_fast/string_is_not_equal_fast 2017-05-16 04:00:37 +02:00
twinaphex bf3188eac4 Combine runloop_ctl and rarch_ctl 2017-05-15 05:06:23 +02:00
twinaphex 9a6e137a56 Get rid of header include 2017-05-10 07:10:05 +02:00
twinaphex ef8094836f Create input_driver_get_float 2017-05-10 07:07:06 +02:00
twinaphex f928e57064 Combine video_context_driver.c and video_driver.c 2017-05-09 01:25:59 +02:00
twinaphex 6d4ac23f26 Cleanup 2017-04-29 16:20:26 +02:00
twinaphex fa9b641ef0 (Android) Buildfix 2017-04-28 15:53:38 +02:00
twinaphex b9f110679a Remove unused variable 2017-04-27 21:38:39 +02:00
Francisco José García García be87a8cdc7 [VITA] Fixing PSTV controls 2017-04-26 22:26:41 +02:00
twinaphex 549ed6fc6b (Android) Buildfix 2017-04-26 15:43:16 +02:00
twinaphex e179108080 Cleanups 2017-04-26 00:24:59 +02:00
twinaphex a146dfee79 Use input_config_binds directly 2017-04-25 23:47:23 +02:00
twinaphex fc5d240297 Get rid of some now-unused functions 2017-04-25 23:30:50 +02:00
twinaphex 53c9acacd6 Wrap access to settings->input.binds completely 2017-04-25 18:50:49 +02:00
twinaphex 4845c4b4db Cleanup 2017-04-25 18:20:10 +02:00
twinaphex d66aff8fbd Start wrapping settings->input.binds 2017-04-25 18:12:13 +02:00
twinaphex 6ace8ce66a Rewrite autoconf_binds and move it to task_autodetect.c - take
it out of the settings struct
2017-04-25 16:33:30 +02:00
twinaphex 20ed6eb90a Start using input_config_get_device_name 2017-04-25 16:04:28 +02:00
twinaphex f9bc2d3783 Use memcmp instead of string_is_equal where possible for
better performance
2017-04-21 22:47:15 +02:00
radius d70d04c473 improve shield portable hack 2017-04-16 16:48:37 -05:00
twinaphex 7f4b490fdb Prevent implicit memsets with struct video_viewport 2017-04-15 19:43:52 +02:00
Tatsuya79 5649f084e3 Make mouse relative again. 2017-03-31 17:28:49 +02:00
Twinaphex b7b3b2cb5f Try to prevent truckload of warnings on iOS 2017-02-26 10:33:03 +01:00
twinaphex 75188800b1 Use C comments 2017-02-19 04:37:40 +01:00
Diablodiab 2cbd1898e8 Android input driver mouse support fixes:
- Fix bug with cursor moving down to the right
- Remove handling of "copy" and "thread" input states simplifying the driver
2017-02-19 02:57:28 +01:00
Diablodiab 47d5242dd7 Add middle mouse button support to Android input driver
Add lightgun support to Android input driver
2017-02-16 21:52:52 +01:00
Diablodiab 4f039cac22 This adds external mouse support to the Android input driver. It also adds support for using the touch screen as mouse in cores with mouse support (eg. ScummVM).
It has been tested with the ScummVM core on:
- NVIDIA Shield TV running Android Nougat 7.0
- NVIDIA Shield Tablet running Android Nougat 7.0
- NVIDIA Shield Tablet running Android Lollipop 5.1
- Huawei Honor 7 running Android Marshmallow 6.0
- HTC Desire 500 running Android Jelly Bean 4.1

It's been tested using the touch screen, a USB mouse/keyboard combo, and a bluetooth mouse.

The Android version running on the device limits the functionality and user experience of the external mouse support.
Android Nougat and/or an NVIDIA SHIELD device with NVIDIA extensions provides the best user experience:

Android API < 14:
- Only left mouse button supported
- The Android mouse cursor will be visible along with the in game mouse cursor
- When the Android mouse cursor hits the edge of the screen it will not be possible to move the in-game mouse cursor further in that direction

Android API < 24 and no NVIDIA extensions available:
- Both left and right mouse buttons supported
- The Android mouse cursor will be visible along with the in game mouse cursor
- When the Android mouse cursor hits the edge of the screen it will not be possible to move the in-game mouse cursor further in that direction

Android API > 23 and/or NVIDIA extensions available (SHIELD devices):
- Both left and right mouse buttons supported
- The Android mouse cursor will be hidden
- The mouse is not limited by the (hidden) Android mouse cursor hitting the edge of the screen

Description of how the the touchscreen mouse support works:
- You can move the in-game mouse cursor using the touch screen. The in-game mouse cursor will move relative to your movements on the touch screen, it will not be centered on where you press the screen.
- One quick tap on the touch screen results in the left mouse button being clicked
- Two taps on the screen and keeping the second tap pressed down results in a left mouse being held down until you release
- Two fingers on the touch screen results in the right mouse button being clicked

The touch screen mouse functionality is active at the same time as overlay support. This might cause some confusion when using cores that are designed for mouse support but where you have also enabled overlay controls. At the top of android_input.c there's a define that can be used to turn off this functionality if it causes more problems than it solves.
2017-02-14 22:34:46 +01:00
xhp-creations b04bf809e3 WiiU Fix Keyboard Input
WiiU Fix Keyboard Input
2017-02-09 14:08:27 -05:00
xhp-creations 4915f452f5 WiiU Initial Keyboard Support
WiiU Initial Keyboard Support
2017-02-09 12:34:12 -05:00
Brad Parker 83619b25e6 DOS: add keyboard driver to support non-joypad keys 2017-02-05 13:55:21 -05:00
aliaspider ffbd1e838a (3DS) build fix. 2017-01-31 03:27:26 +01:00
Brad Parker 57949227df DOS: initial input/joypad driver 2017-01-24 00:55:58 -05:00
twinaphex 96c8ca5a09 Header update #1 2017-01-22 13:40:32 +01:00
twinaphex 0354ced675 Style nits 2017-01-17 19:02:49 +01:00
twinaphex 7931436f5b Apply xerpi diff 2017-01-17 18:12:23 +01:00
aliaspider 8cb692622a (WiiU) add support for bluetooth controllers (Wiimote, nunchuk, classic
controller, wiiu pro controller).
2017-01-16 18:52:39 +01:00
Aaron Kling 8a2585f8dc Handle motion events if source is touchscreen or mouse regardless
of other sources being set.

API level 9 doesn't support stylus, but still needs to be handled.
Current code throws out additional sources that it doesn't
recognize. This instead ignores whether other sources are set.
2017-01-13 18:37:50 -06:00
twinaphex ea3dd6a95b Set device name when autoconfig connect task fails for all
other input drivers too
2017-01-13 05:00:13 +01:00
twinaphex b45c96cc18 (WiiU) Buildfix 2017-01-11 08:24:55 +01:00
twinaphex 5b15119f06 (PSP) Buildfix 2017-01-10 22:48:39 +01:00
twinaphex cd105e7432 (CTR) Buildfix 2017-01-10 22:45:53 +01:00
twinaphex 6b5bf1ccc3 (wiiu_input.c) Fix build 2017-01-10 22:44:44 +01:00
twinaphex 2ed1e38021 dinput.c - silence warning 2017-01-10 20:11:51 +01:00
twinaphex f3de77e93c (dinput.c) remove dependency on settings struct 2017-01-10 20:00:07 +01:00
twinaphex 8bd12368ef Pass joypad_driver name to input_driver_init function and make
sure we don't need to access the settings struct from the
input driver
2017-01-10 17:59:48 +01:00
twinaphex db6fba51c3 Cleanup dinput.c 2017-01-10 17:42:57 +01:00
twinaphex d48141041d Pass joypad_info to input_state function callback - less
settings pointer grabbing
2017-01-10 17:40:21 +01:00
twinaphex da4d2a9f42 Remove conditionals for device JOYPAD from input_state callback functions 2017-01-10 17:05:04 +01:00
twinaphex b9945f05f1 Pass joypad_info to input_joypad_analog 2017-01-10 03:53:57 +01:00
twinaphex 6376f2af68 Add rarch_joypad_info_t 2017-01-10 03:44:53 +01:00
Josh Palmer 437734e407 Rewrite QNX input & joypad drivers for proper BB10.3.1 support 2017-01-09 20:26:09 +00:00
Josh Palmer 8672b88eff First round of momentics project fixups 2017-01-09 20:24:51 +00:00
twinaphex 103042de96 Rewrite task_autodetect.c 2016-12-31 07:43:34 +01:00
Hans-Kristian Arntzen b2059dcb79 Implement basic Wayland keyboard and mouse. 2016-12-17 20:28:08 +01:00
twinaphex aafae944cb Don't memset autoconfig_params_t 2016-12-17 14:26:13 +01:00
twinaphex 2153f3f011 Check if autodetect is enabled at beginning of connect task 2016-12-16 15:18:04 +01:00
twinaphex 209305f944 Connect task now sets PID/VID too 2016-12-16 14:02:11 +01:00
twinaphex d9def056e7 The 'connect' task now sets the device name upon completion 2016-12-16 12:33:56 +01:00
twinaphex dc7549434f Add headers 2016-12-07 08:10:02 +01:00
twinaphex a12d0d082d Move input_translate_coord_viewport to video_driver.c 2016-12-07 08:07:11 +01:00
Adriano Moura 4434bd221a Fixes an issue where mouse is only sampled half the time.
Very obvious when aiming with a mouse like in tyrquake.
2016-12-06 03:31:21 -02:00
twinaphex 2ba311274e Simplify input_translate_coord_viewport 2016-12-05 05:18:36 +01:00
Brad Parker e39031cbd0 revert rest of unicode changes 2016-12-03 00:15:29 -05:00
Brad Parker f725b48555 starting to revert unicode changes 2016-12-03 00:15:29 -05:00
Brad Parker d891f1c90b remove explicit unicode def/undefs 2016-12-02 14:34:29 -05:00
Brad Parker 3846ce1837 build fixes for MSVC, start moving back to TCHAR usage so we can switch unicode on and off 2016-12-02 12:54:39 -05:00
twinaphex d3151927bf (Emscripten) Buildfix 2016-12-02 17:41:44 +01:00
twinaphex 021559a877 Get rid of runloop.h dependencies inside input/ dir 2016-12-02 06:07:45 +01:00
twinaphex 779b680264 (Android) Buildfix 2016-12-01 23:05:36 +01:00
Brad Parker 23dd41a3cc missing ../ 2016-12-01 15:40:31 -05:00
twinaphex d3c22cb0e4 Move input/input_autodetect.c to tasks/task_autodetect.c 2016-12-01 20:38:20 +01:00
twinaphex 76d0380e45 Rename input_autoconfigure_joypad to input_autoconfigure_connect 2016-12-01 18:57:44 +01:00
twinaphex e689d55414 Rename autoconfig functions 2016-12-01 18:52:34 +01:00
Brad Parker ba54f20626 initial libcaca video driver 2016-12-01 12:13:45 -05:00
twinaphex a9e627ca57 (udev_input.c) Rename static function 2016-12-01 17:33:41 +01:00
twinaphex 31a95b8972 (android_input.c) Get rid of HAVE_MENU ifdefs 2016-12-01 17:31:26 +01:00
twinaphex 200be98052 (udev_input.c) use udev_common.c 2016-12-01 16:51:43 +01:00
twinaphex 9afa24ea70 Reuse udev_common.c function 2016-12-01 15:05:17 +01:00
Brad Parker 3ac51389bb dinput: catch null pointer 2016-11-30 02:07:29 -05:00
Twinaphex 17dc79a002 Buildfixes/silence unused variable warnings 2016-11-30 04:32:59 +01:00
Brad Parker 367dea6723 unicode-ify a couple other windows files, start changing function names to W version explicitly 2016-11-29 20:32:24 -05:00
twinaphex e9846aae68 (Android) Remove unused variables 2016-11-27 15:02:14 +01:00
twinaphex 95254aa79b Remove 'back as menu toggle' setting 2016-11-21 13:05:23 +01:00
Alcaro dd9a810451 This warning doesn't need to be here 2016-11-06 12:02:37 +01:00
aliaspider 0433cae3c9 (WIIU) misc. 2016-11-05 15:01:43 +01:00
aliaspider 176dd79f33 (WIIU) misc. 2016-11-02 22:06:15 +01:00
twinaphex 763a925a17 Fix Android build 2016-10-29 04:59:56 +02:00
twinaphex ce98a4dd19 Get rid of now unused input_driver_key_pressed 2016-10-29 04:57:28 +02:00
radius 6a950526d5 add group for other android atv devices 2016-10-28 20:49:44 -05:00
Twinaphex 7e5ee4f86c Prevent uninitialied variable 2016-10-27 21:47:15 +02:00
twinaphex d246d320c7 Get rid of messy 'all_users_control_menu' hack - will be dealt
with better once menu_input branch has been merged
2016-10-27 07:00:13 +02:00
twinaphex b9909bf5ba Add CONFIG_BIND_ALT 2016-10-27 04:03:24 +02:00
aliaspider a4d745a471 preliminary port to the wiiu platform 2016-10-27 01:34:10 +01:00
twinaphex 5fc6519328 Prevent more potential crashes 2016-10-27 01:21:01 +02:00
Twinaphex 26547be5ed Try to prevent another crash 2016-10-26 23:05:14 +02:00
Twinaphex 90fbc09f82 Fix remaining crash on OSX 2016-10-26 10:34:24 +02:00
twinaphex 8ce882c829 Should hopefully fix most of the remaining issues 2016-10-26 10:29:26 +02:00
twinaphex d6901685f7 Prevent crash with udev driver 2016-10-26 10:21:56 +02:00
twinaphex 858f96d082 Try to prevent crashes when amount of selected users is less
than what a core can support
2016-10-26 10:19:22 +02:00
twinaphex 5ea2078638 Attempt buildfix 2016-10-24 06:40:09 +02:00
twinaphex 294f54ebf0 Cleanup udev_pointer_state 2016-10-24 02:47:29 +02:00
twinaphex b0ed69f05c Optimize android_keyboard_port_input_pressed 2016-10-23 20:43:14 +02:00
twinaphex 57457c2d70 Optimize apple_input_is_pressed 2016-10-23 20:42:09 +02:00
twinaphex 647ffca76c Optimize input_joypad_pressed code 2016-10-23 20:37:12 +02:00
twinaphex a4a1e96210 Prevent more implicit memsets 2016-10-16 01:40:29 +02:00
Twinaphex 183dc914c4 (Cocoa) Add stub scrollWheel callback 2016-10-05 02:00:11 +02:00
twinaphex 91b1889873 (X11) Mouse input is no longer registered when we are on the
titlebar of the window or we are no longer inside the window
2016-10-03 06:50:00 +02:00
twinaphex 3f35e10014 Solve some warnings pointed out by scan-build 2016-09-25 05:55:55 +02:00
twinaphex 7fdc38bf30 Prevent null pointer dereference 2016-09-22 21:57:55 +02:00
twinaphex e8deea65a9 Remove unused variable 2016-09-22 21:55:54 +02:00
twinaphex 6a02cf174e udev_input_poll - add early return in case udev is NULL 2016-09-18 20:32:16 +02:00
twinaphex 51b0e61712 Cleanups 2016-09-11 16:24:02 +02:00
twinaphex 9d9471413d (Emscripten) Buildfix 2016-09-11 15:24:33 +02:00
twinaphex 012e069f86 Get rid of general.h includes 2016-09-11 13:21:56 +02:00
twinaphex 075aea2289 Header include cleanups 2016-09-06 00:56:00 +02:00
twinaphex d4122806ab (Android) Buildfix 2016-09-05 18:34:21 +02:00
twinaphex acd4dd527b Header include cleanups 2016-09-05 18:31:32 +02:00
twinaphex 4571dc33fc header include cleanups 2016-09-05 17:29:19 +02:00
Brad Parker a17679a0c5 add input option to allow any user to control the menu 2016-09-03 19:01:29 -04:00
Brad Parker 0eb1777a1f remove extra semicolons 2016-09-03 10:30:21 -04:00
twinaphex 20f7d82f95 More header include cleanups 2016-09-01 18:07:44 +02:00
twinaphex c8d5381779 header include cleanups 2016-09-01 05:48:20 +02:00
Francisco José García García e3b5fdd815 (VITA) Add vibration for PSTV 2016-08-30 14:29:19 +02:00
twinaphex ba7d638b99 Use string_is_equal 2016-08-29 18:46:41 +02:00
twinaphex 81e76ca5e7 (MSVC 2003) Buildfixes 2006-01-17 06:28:35 +01:00
twinaphex cc1d579036 (Vita) psp_input_state - Don't early return if port is higher than 0 2016-08-07 16:29:58 +02:00
twinaphex 5dc4a730d2 (Xenon 360) Get rid of lifecycle_state 2016-08-02 17:05:58 +02:00
dalter fffe1d099c Fix imput in RetroArch menu 2016-07-31 17:56:40 +03:00
twinaphex 092ca463d2 Only use extern C for C++ builds 2016-07-16 19:43:07 +02:00
twinaphex eb77f99e1e (Windows) Finally properly 'swallows' event when doubleclicking on titlebar 2016-07-16 18:09:21 +02:00
twinaphex ce6f3f955c Doubleclick on titlebar should no longer trigger button press
in RA window
2016-07-16 17:56:07 +02:00
twinaphex 616b9f7471 (Win32) Test 2016-07-16 17:44:21 +02:00
twinaphex 2f7684c743 (Android) Cleanups 2016-05-25 16:03:32 +02:00
radius b6b2fdfaa6 comment out xbox 360 & dualshock hacks that are not needed anymore, friendly labels can be applied on the autoconf files instead 2016-05-25 00:47:01 -05:00
twinaphex d5d2f7f8ee Fix resource leaks 2016-05-23 22:17:28 +02:00
twinaphex 974d3245d2 Fix logically dead code warnings 2016-05-23 22:04:00 +02:00
Twinaphex 1f7c51b458 (QNX) more build fixes 2016-05-19 20:14:58 +02:00
Twinaphex 85331042be (QNX) Build fixes 2016-05-19 20:02:39 +02:00
twinaphex 4a7ab8366b Move libretro.h headers to libretro-common/include 2016-05-10 19:03:53 +02:00
twinaphex b79b2dca13 Create performance_counters 2016-05-10 08:53:14 +02:00
twinaphex 2691ab0c7d Rename command_event enums 2016-05-09 20:51:53 +02:00
twinaphex a98ef36d36 Rename event_cmd_ctl to command_event 2016-05-09 20:20:50 +02:00
twinaphex 725c202498 Remove input_driver_ctl 2016-05-08 23:12:04 +02:00
Hans-Kristian Arntzen 8870e85395 More fixes for menu_display_ctl.
Grep shows nothing now.
2016-05-08 14:18:12 +02:00
Hans-Kristian Arntzen 66c4f608e6 Clear out rest of video_driver_ctl use. 2016-05-08 14:10:28 +02:00
Hans-Kristian Arntzen d723411436 De ioctl video_driver. 2016-05-08 14:00:51 +02:00
Diablodiab 58c5cc6f46 Change ALooper_pollAll in android_input_poll from a non blocking call into a 1 ms
blocking call. For some reason this allows more input events to queue up in the
input queue for processing making it easier to press multiple gamepad buttons and
have it register within a single frame.
2016-04-29 00:42:09 +02:00
twinaphex 6db13ab51d (udev) cleanup 2016-04-28 22:50:02 +02:00
twinaphex 8b4a41155d C89_BUILD buildfixes 2016-03-20 05:24:05 +01:00
twinaphex 6f80e09ce1 Change MIN/MAX to upper-case 2016-03-02 00:07:31 +01:00
Twinaphex 33356f2df6 (OSX) Buildfix 2016-02-26 13:40:29 +01:00
twinaphex f1a572822b Create RARCH_DISPLAY_CTL_VIEWPORT_INFO 2016-02-14 05:42:27 +01:00
Diablodiab 84b6b505ad Fix crash when defining gamepad keys 2016-02-08 01:53:33 +01:00
Diablodiab bdb9471d13 Added support for using keyboards in the Retroarch menu and for mapping to gamepad keys. 2016-02-08 01:06:15 +01:00
twinaphex 372d673a26 Rename event_command to event_cmd_ctl - add second parameter 2016-01-22 15:34:43 +01:00
twinaphex fbd2e9aa84 Use string_is_equal more 2016-01-21 02:48:00 +01:00
Twinaphex 794bcc53c3 (iOS) Buildfix 2016-01-15 23:15:49 +01:00
twinaphex e4533fb7ec (OSX/iOS) Cleanup 2016-01-15 22:33:25 +01:00
Twinaphex 8c8a3085a5 (OSX) Buildfix 2016-01-15 22:22:37 +01:00
twinaphex 8323d06d3d (Cocoa) No more dependencies on get_chosen_screen or
get_backing_scale_factor
2016-01-15 22:20:46 +01:00
Diablodiab e738b57cf8 Add handling of Nvidia Shield Virtual Controller
The NVIDIA Button on the Nvidia Shield Controller and inputs received from CEC remotes
are detected as a "Virtual" controller on the Shield TV.

If a virtual controller is detected on the Shield TV before an actual game controller
then it will be configured as "Shield Virtual Device". This allows the use of the
buttons on a CEC remote to control the Retroarch menu and games.

When an actual controller is connected the Virtual Device will be overwritten and
the NVIDIA button of the Virtual device will be mapped to the controller as the
menu button.

This also fixes the situation where you press the NVIDIA Button before any other
button on the game controller and it does nothing. Now it will go into the
Retroarch menu even if it is the first button pressed.

A matching profile for "Nvidia Shield Virtual Controller" has been sent as a pull request to
the "retroarch-joypad-autoconfig" repository.
2016-01-15 18:41:17 +01:00
Diablodiab 9245113738 Fix if clause that could result in a keyboard key being handled as gamepad input 2016-01-14 21:16:54 +01:00
Diablodiab 2c08dc0f4f Extends Android keyboard functionality to allow for up to three keyboards.
This solves the problem with volume buttons on phones being detected as
keyboards and blocking a real keyboard from being mapped afterwards.

Renamed id_1 and id_2 to pad_id1 and pad_id2
Renamed id_3 to kbd_id and change it to an array

Implement function is_keyboard_id(int id) which checks if an id is mapped as
a keyboard
2016-01-14 20:59:25 +01:00
Diablodiab afe8d2d617 Fixed two bugs in Android keyboard functionality and changed the way the keyboard
is registered (introduced an id_3 value)
2016-01-12 21:48:09 +01:00
twinaphex f374af9dbc Revert "Add keyboard input functionality to Android version"
This reverts commit 17bdb549d4.
2016-01-12 15:52:42 +01:00
Twinaphex db51b5a2c0 Merge pull request #2636 from diablodiab/android-keyboard-support
Add keyboard input functionality to Android version
2016-01-11 22:26:51 +01:00
Diablodiab 17bdb549d4 Add keyboard input functionality to Android version 2016-01-11 21:06:46 +01:00
twinaphex 347a18cb30 Update input headers 2016-01-10 04:33:01 +01:00
twinaphex ef7a786527 Attempt to prevent segfault when pressing Enter in DRM/KMS mode 2016-01-02 22:28:21 +01:00
twinaphex 697351ee67 (input) Use string_is_empty 2015-12-26 07:54:17 +01:00
twinaphex b8bbdc6f4c Revert udev drivers 2015-12-17 03:02:48 +01:00
radius 4b082daa7e fix input labels empty on android 2015-12-12 20:56:42 -05:00
radius 48fbc5eda4 Improve the shield portable workaround and reimplement the workaround for the shield atv,
This workaround could be used as a foundation for other console like devices.
2015-12-11 17:25:03 -05:00
twinaphex 4727ddb52d Create RARCH_INPUT_CTL_KEY_PRESSED 2015-12-10 12:47:36 +01:00
twinaphex 7a791fa6e8 Turn primary_id/secondary_id into static variables 2015-12-09 22:17:55 +01:00
Twinaphex 2bb440bc08 Merge pull request #2535 from fr500/master
new workaround for pads implemented as two independents hid devices
2015-12-09 22:16:43 +01:00
twinaphex 23c13c0043 Delay reinit, gets rid of the remaining concurrency errors 2015-12-09 20:30:55 +01:00
radius 08f42beefb add ARCHOS gamepad 2015-12-09 10:00:32 -05:00
twinaphex 959b781c06 (Android) Implement input_alive 2015-12-08 13:47:46 +01:00
twinaphex 629a660af4 Check if android_app or android variables are NULL in android_input_poll_memcpy 2015-12-08 08:53:26 +01:00
twinaphex c1312d3b41 Buildfix 2015-12-07 21:21:13 +01:00
twinaphex 84bcf896b6 Set SET/UNSET_FRAME for Android 2015-12-07 21:17:55 +01:00
twinaphex 1e522f4035 (Android) Start calling SET_STUB_FRAME for LOST_FOCUS/GAINED_FOCUS 2015-12-07 21:07:04 +01:00
radius e28450368f reset the ids when the driver is reinitialized 2015-12-06 23:39:42 -05:00
radius 17aa00db1a change variables 2015-12-06 23:20:47 -05:00
radius cbd8819fb3 new workaround for pads implemented as two independents hid devices 2015-12-06 22:58:54 -05:00
Higor Eurípedes b64ecfae92 (android_input) Fix negative port issue 2015-12-06 21:08:27 -03:00
twinaphex c6359d6dbc Divorce g_system_menu from global state 2015-12-06 19:31:47 +01:00
Higor Eurípedes 1cd0a0ff0a (android_input.c) Fix usage of signed/unsigned
This caused a segmentation failure in android_keyboard_state_get()
2015-12-05 19:23:02 -03:00
twinaphex 3517fdc02a (Android) Buildfix 2015-12-05 21:18:06 +01:00
twinaphex c0a1a6a3fe Move system->shutdown to runloop_ctl, turn it into a local
static variable
2015-12-04 12:44:12 +01:00
twinaphex f21a9f2fd2 dinput.c - buildfix 2015-12-04 11:28:13 +01:00
twinaphex a53334fba6 Backport/rewrites wmarquesr - pt. 4 2015-12-04 10:41:05 +01:00
twinaphex 071912871b (android_input.c) Attempt to only grab dlopen handle once 2015-12-03 21:19:16 +01:00
twinaphex 8ae39377e7 (Android) Cleanups 2015-12-03 01:59:43 +01:00
twinaphex 694e64831b Create thread duplicate variant of android_input_data_t variable 2015-12-02 23:23:21 +01:00
twinaphex 923433ead7 Move engine_handle_dpad code to android_input.c - copy
hat and analog state to intermediary on android_app during
poll time
2015-12-02 22:33:27 +01:00
twinaphex 69ee18cea6 Create android_input_data_t 2015-12-02 22:12:43 +01:00
twinaphex e859fae4ee (Android) Move sensorManager and sensorEventQueue to android_app 2015-12-02 21:38:21 +01:00
twinaphex b7d7dcef1c Expand android_app 2015-12-02 19:28:15 +01:00
twinaphex cfe5491b05 (Android) Reimplement how shutdown gets signalled 2015-12-02 17:55:31 +01:00
twinaphex d6b5dd6ac4 Flesh out android_native_app_glue.c implementation some more 2015-12-02 17:46:20 +01:00
twinaphex 986e4bf40d (Android) Native activity updates 2015-12-02 08:54:24 +01:00
twinaphex 0db7cda264 Start moving rewind code to rewind.c 2015-11-30 22:25:13 +01:00
twinaphex 9824eb7ea9 Rename rarch_main_ctl to runloop_ctl 2015-11-30 21:42:59 +01:00
twinaphex 4e333302ae Rename RARCH_MAIN_CTL* to RUNLOOP_CTL* 2015-11-30 21:35:50 +01:00
twinaphex 7cb78cca58 Make g_epoll static 2015-11-30 18:14:07 +01:00
twinaphex 54655c37cd Create epoll_waiting 2015-11-30 18:08:00 +01:00
twinaphex ecbfc72e9b Create epoll_common 2015-11-30 18:05:10 +01:00
twinaphex 6d90c42bb5 We need to check for the instance where udev is only initialized
for the joypad part and not the general input driver
2015-11-30 16:56:32 +01:00
twinaphex 62260cf892 Turn g_udev static 2015-11-30 16:52:29 +01:00
twinaphex 28602d84af Make g_udev_mon static 2015-11-30 16:47:43 +01:00
twinaphex b76481b21e Create udev_mon_hotplug_available 2015-11-30 16:42:52 +01:00
twinaphex 2db1197942 Expand udev_common.c 2015-11-30 16:39:22 +01:00
twinaphex 5b6641b077 (linuxraw_input.c) Remove unused driver reference 2015-11-30 02:50:10 +01:00
twinaphex 5e1b2b3bfa Move driver->input_data to input_driver.c 2015-11-29 18:18:25 +01:00
twinaphex 9a743ec357 Create input_driver_key_pressed 2015-11-29 16:45:38 +01:00
twinaphex d018f65e95 Rename cocoa_input_keyboard_event 2015-11-29 16:26:13 +01:00
twinaphex 025d2c6328 (Android) Cleanups 2015-11-29 16:20:04 +01:00
twinaphex 2d455d78b3 Move inptu state to android_joypad.c 2015-11-29 16:18:29 +01:00
twinaphex f1fe78eb1a (cocoa_input.c) Include header 2015-11-29 15:52:37 +01:00
twinaphex 2deeb36a81 Rename apple_keycode.h 2015-11-29 15:50:27 +01:00
twinaphex 99cc4c59c3 (Apple) Buildfix 2015-11-29 15:46:01 +01:00
twinaphex bc748951c6 Start no longer having dependencies on apple input data for
keyboard_event_apple.c
2015-11-29 15:44:21 +01:00
twinaphex dff44d8d49 (udev) split up keyboard code to separate files 2015-11-29 15:35:34 +01:00
twinaphex 6c7da0e503 (udev) Change function signature of callback 2015-11-29 06:34:35 +01:00
twinaphex 9fd9fd10e8 Create input_x11_common 2015-11-29 03:34:09 +01:00
twinaphex 127448f848 Use video_driver_window_get 2015-11-29 01:39:28 +01:00
twinaphex 0044d853f8 Move display_type / display_window etc all to gfx/video_driver.c -
no more dependencies on driver_t
2015-11-29 01:12:49 +01:00
Twinaphex 3001729545 Revert "Go through input_driver_get_data_ptr whenever we need input data"
This reverts commit 52c9a2ec43.
2015-11-28 18:58:33 +01:00
twinaphex 52c9a2ec43 Go through input_driver_get_data_ptr whenever we need input data
state
2015-11-28 18:51:12 +01:00
twinaphex 7856c4e940 (Android) Cleanups 2015-11-28 18:39:43 +01:00
twinaphex b06d08a32e Remove some references to driver->input_data 2015-11-28 18:33:59 +01:00
twinaphex c23846c5dc Merged input_joypad.c and input_joypad_driver.c 2015-11-28 16:22:49 +01:00
twinaphex 1df5d44bdb Rename input/keyboard_line 2015-11-28 16:13:16 +01:00
twinaphex a6ccc188a8 Rename input_common.c to input_config.c 2015-11-28 02:22:58 +01:00
twinaphex a8d868f187 (Android) Implement 'focused' callback for androidegl_ctx 2015-11-27 20:38:29 +01:00
twinaphex a1ecc5eee3 (Android) Some cleanups in engine_handle_cmd 2015-11-27 18:27:30 +01:00
twinaphex daeb8cacaf Set idle when APP_CMD_LOST_FOCUS 2015-11-27 00:23:47 +01:00
twinaphex a3e52a9369 Put M_PI inside retro_miscellaneous.h 2015-11-24 00:05:37 +01:00
Alcaro 7b66b65823 Add some error messages if the null drivers are used. 2015-11-23 19:42:46 +01:00
twinaphex 389cf13db5 Don't reference driver->video_data outside of gx/video_driver.c anymore 2015-11-23 18:51:04 +01:00
twinaphex 60fec26bcf (sdl_input.c) Use video_driver_get_ident 2015-11-23 14:57:24 +01:00
twinaphex 9b41061143 Rename driver->video 2015-11-23 14:14:12 +01:00
twinaphex 074f14b132 Add verbosity.c/verbosity.h 2015-11-23 12:03:38 +01:00
twinaphex 806c124eae Merge video_viewport.c and video_driver.c 2015-11-21 13:01:23 +01:00
twinaphex 5cea9e5400 Add RARCH_DISPLAY_CTL_IS_FOCUSED 2015-11-20 15:24:24 +01:00
Twinaphex e27d533fcd (iOS/Cocoa) Try this - prefer MFi analog value over BTStack one 2015-11-18 05:37:41 +01:00
Alwin Garside e5b0a5858a Fix rwebinput driver
input/drivers/rwebinput_input.c:
 -  rwebinput_key_pressed() was defined twice. Not sure why, but removed the first instance of it.
 -  in rwebinput_input_state() the device was hardcoded to INPUT_DEVICE_TYPE_NONE which would result in it always returning 0
2015-11-18 02:45:41 +01:00
Alwin Garside 83d63fcdd1 Merge remote-tracking branch 'libretro/master' 2015-11-18 02:12:47 +01:00
Alwin Garside 58748da89d Emscripten related fixes.
- audio/audio_dsp_filter.c:  append_plugs() should only be called if HAVE_DYLIB
- emscripten/library_rwebaudio.js: Performance improvements, and fallback support for browsers that don't support the Performance API. (e.g. mobile Safari)
- emscripten/library_rwebinput.js: Improve mouse handling. Still not optimal, but works with browsers that don't support mouse capturing.
- frontend/drivers/platform_emscripten.c: Added global function for easy access to certain RetroArch features from JavaScript.
- gfx/video_driver.h: Disabling HAVE_MENU incorrectly disabled set_texture_enable()
- input/drivers/rwebinput_input.c: Missing header file: "../input_joypad.h".
- Makefile.emscripten: Cleanup and make sure the appropriate functions are exported.
2015-07-17 12:46:08 +02:00
twinaphex 450c665619 Create meta_key_pressed 2015-07-17 03:31:51 +02:00
twinaphex a2af5252c1 Get rid of input_driver_key_pressed 2015-07-17 03:09:12 +02:00
twinaphex f5566cbe3b Cleanup warnings 2015-07-16 10:11:28 +02:00
fr500 ca682d38eb better shield portable hack 2015-07-16 03:22:28 -04:00
twinaphex 56f273b0b5 Put in the Nvidia Shield hack back in for Shield Portable
explicitly
2015-07-15 06:26:32 +02:00
Twinaphex 1ff9f89e7d Merge pull request #1952 from fr500/master
Proposals
2015-07-12 21:13:01 +02:00
radius 6f9467817e Shield Fix 2015-07-12 13:56:34 -05:00
twinaphex 7fb1265227 (PSP/CTR) Should fix lifecycle state menu toggling 2015-07-12 10:46:20 +02:00
twinaphex 23348f41ac (GX) Menu button toggle should work again 2015-07-12 10:41:49 +02:00
twinaphex 2a881d64be Name some functions the same across drivers 2015-07-12 08:51:13 +02:00
twinaphex fbc504acfe Turn one C++ comment into C 2015-07-12 08:46:41 +02:00
twinaphex 32b3aa6b00 (Cocoa) cocoa_input.c - Simplifications 2015-07-12 08:45:12 +02:00
twinaphex c2c9ace028 Input driver's 'input_key_pressed' implementation does not
have to query for overlay state - this is done in an upper-level
function already
2015-07-12 08:39:34 +02:00
twinaphex 135ee2f503 Use UINT64_C(1) everywhere instead of 1ULL 2015-07-12 07:53:46 +02:00
twinaphex c9814c9b12 (Overlay) Don't expose input overlay handle to outside 2015-07-12 07:22:52 +02:00
twinaphex af752ba24b (PS3) ps3_input.c - cleanup 2015-07-12 02:55:29 +02:00