643 Commits

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