Commit Graph

658 Commits

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