Commit Graph

826 Commits

Author SHA1 Message Date
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