Commit Graph

41558 Commits

Author SHA1 Message Date
twinaphex 39a1ebacc3 Merge branch 'fr500-master' 2017-12-31 03:44:39 +01:00
twinaphex 4c608ca994 Buildfix 2017-12-31 03:44:28 +01:00
twinaphex 8686b8c5a2 Merge branch 'master' of git://github.com/fr500/RetroArch into fr500-master 2017-12-31 03:41:39 +01:00
radius acdb5efdcd try to fix msvc2003 builds 2017-12-30 21:38:00 -05:00
twinaphex 923eef3eb3 Updates to D3D headers 2017-12-31 03:36:43 +01:00
twinaphex b464014a51 C89_BUILD fixes 2017-12-31 03:27:55 +01:00
twinaphex f7744d812e Turn this into a static variable 2017-12-31 03:18:10 +01:00
twinaphex 88cac16409 (MSVC 2003) Compile griffin.c as C code 2017-12-31 03:16:08 +01:00
misson20000 be5ebbc039 (NSW) since we haven't yet gotten the OS graphics driver, upon calling `display_finalize`, to release some of the (currently global) resouces we give it when we initialized it, we need to maintain a little bit of global state in the graphics driver so it can be freed and reinitialized when we load a core. this should be able to be reverted when we implement `alloc_pages` in libtransistor. see https://github.com/reswitched/libtransistor/issues/74 and https://github.com/reswitched/libtransistor/issues/69 2017-12-31 03:04:15 +01:00
misson20000 7cc614263a (NSW) add default button bindings and fix right joystick 2017-12-31 03:04:11 +01:00
Twinaphex 6732afa608
Update CHANGES.md 2017-12-31 02:29:54 +01:00
Twinaphex 4be19999a5
Update CHANGES.md 2017-12-31 02:07:01 +01:00
gblues 11fed40c79 Fix another crash bug in joypad_connect
== DETAILS

I fixed a similar bug in a past commit, with the same root cause: making
assumptions about the length of the array.

- Add validation to joypad_connection_init() so that if >MAX_USERS is
  requested, a warning is logged and only MAX_USERS is allocated.
- Rewrote the iteration routines so they strictly use the
  joypad_is_end_of_list() method to detect the end.
2017-12-30 16:36:54 -08:00
Twinaphex 1b6870b180
Merge pull request #6008 from orbea/oss
qb: Fix --disable-oss for openbsd.
2017-12-31 00:49:55 +01:00
orbea 7ab2254fc4 qb: Fix --disable-oss for openbsd.
If --disable-oss is passed to configure we should not check for any oss support.
2017-12-30 15:45:19 -08:00
Twinaphex d9c0f769c7
Merge pull request #6006 from aliaspider/master
(WIIU) update shader and add alpha blending to menu + overlays.
2017-12-31 00:21:53 +01:00
Twinaphex d8bb9ac018
Merge pull request #6002 from orbea/gitignore
gitignore: Add .tmp.cxx
2017-12-31 00:20:41 +01:00
aliaspider b371f4bb32 (WIIU) add a color attribute to tex_shader.
+ some fixes to overlay and menu display code.
2017-12-30 23:21:32 +01:00
Alcaro e5b346ad92
what an impressive bug farm. #6001 2017-12-30 17:43:48 +00:00
orbea a6f7bf9492 gitignore: Add .tmp.cxx 2017-12-30 09:33:34 -08:00
aliaspider f6fdd421c6 (WIIU) shaders: use bitfields for GPU register values. 2017-12-30 16:39:23 +01:00
twinaphex 136fb6e3c9 (WIIU) Cleanup 2017-12-30 15:35:32 +01:00
Twinaphex 0389bc64fe
Merge pull request #5997 from libretro/new_hid
New HID system (courtesy of gblues)
2017-12-30 15:30:03 +01:00
twinaphex 7e61f08cdb Simplify audio_driver_flush 2017-12-30 14:14:30 +01:00
twinaphex 74eb6336d5 Buildfix 2017-12-30 13:48:21 +01:00
twinaphex 481a140c9c Buildfixes 2017-12-30 13:45:29 +01:00
twinaphex 292d506ed8 Fix more MSVC Griffin build errors 2017-12-30 13:35:47 +01:00
twinaphex 8d5a8355a7 Fix some linkage errors with RA MSVC 2010 2017-12-30 13:00:08 +01:00
twinaphex 20bb653f1e (Xbox 360) Buildfixes 2017-12-30 12:36:00 +01:00
twinaphex d5d4e9ff2b (shader HLSL) Start adding support for C as well 2017-12-30 12:16:07 +01:00
twinaphex fb74e11011 (360) Small buildfixes 2017-12-30 12:00:43 +01:00
Twinaphex ca2bc6dccd
Update CHANGES.md 2017-12-30 11:25:28 +01:00
twinaphex b788bf71bd (3DS) Implement frontend rating - will return 6 for New 3DS/2DS,
and 3 for Old 3DS/2DS
2017-12-30 11:23:47 +01:00
misson20000 6254ddecf2 (NSW) initial support for menu 2017-12-30 11:14:45 +01:00
misson20000 5003a2d50b (NSW) fix switch audio driver to not start the audio output twice and not start it by default 2017-12-30 11:14:45 +01:00
Twinaphex e9b6f1e18d
Merge pull request #5999 from orbea/gitignore
gitignore: Add .tmp and .tmp.c
2017-12-30 08:40:11 +01:00
twinaphex 8619534a31 Fix resource leaks pointed out by Coverity 2017-12-30 08:37:52 +01:00
orbea 129a44b8ce gitignore: Add .tmp and .tmp.c
These are test programs for checking if features can be enabled and
should not be committed.
2017-12-29 23:28:23 -08:00
twinaphex 20122d21ee CXX_BUILD buildfix 2017-12-30 08:12:38 +01:00
twinaphex 794de84961 Get rid of variable-length array 2017-12-30 08:09:35 +01:00
Twinaphex f63385de08
Merge pull request #5994 from orbea/bsd
qb: Include /usr/local/lib for *bsd too
2017-12-30 05:25:59 +01:00
Twinaphex 6c08ceacb9
Merge pull request #5995 from meepingsnesroms/master
Fix new 3ds xl not being detected, others
2017-12-30 05:25:46 +01:00
gblues ec45df79f4 Dummy out calls into HID driver
== DETAILS

Got system memory error. Probably because the calls aren't properly
implemented. So  dummy them out for now.
2017-12-30 04:43:46 +01:00
gblues 65c177a0ee Move HID driver into wiiu/ code
== DETAILS

RetroArch's general HID drivers are intended as a full-on substitute for
other input drivers such as XInput, DInput, SDL, etc. The Wii U port is,
to my knowledge, the first case of heterogenous input drivers working
concurrently.

As such, I've moved things around:

- The HID driver source is moved into the wiiu/input/ directory alongside
  the joypad subdrivers.
- We no longer use the input_hid_init_first() method to instantiate; instead
  we just init the wiiu HID driver directly.
- The HID pad driver and HID subsystem driver enjoy a tighter coupling,
  mainly having to do with the initialization of the joypad connections
  list, because there's no way to inform the HID driver's init() method
  how many slots to allocate.

== TESTING
Will test in a moment, but at  least it compiles cleanly. ;)
2017-12-30 04:43:38 +01:00
gblues 704cc61fd8 Fix bug in autodetect macro, gamepad now works properly
== DETAILS
The gamepad didn't work because I had tried to rename the pad from
'WIIU Gamepad' to 'WiiU Gamepad'.

I added some debug logging and (to cut out a lot of trial-and-error)
discovered that the reason it didn't work was because a bug in a macro
was  using the define literally instead of substituting it (so e.g.
the autodetect handler was trying to match 'WiiU Gamepad' against the
literal string 'PAD_NAME_WIIU_GAMEPAD').

- Fixed the macro bug
- Left a minimal amount of the debug logging in place; may come in
  handy for someone else.
- Updated wpad/kpad/hidpad to use the define constants

== TESTING
Did a test build and confirmed the gamepad responded.
2017-12-30 04:43:33 +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 52c754cfa8 Split wiiu_gamepad into three sub-drivers
== DETAILS
Well, after a lot of code analysis, this seems like the
best way to handle things on the Wii U without also completely
re-architecting the I/O handling in RetroArch.

How it works:

- the top-level wiiu_joypad driver is now nothing more than a
  delegator.
- the wiiu-specific drivers live in `wiiu/input/`
- wpad_driver.c handles the WiiU gamepad
- kpad_driver.c handles the wiimotes
- hidpad_driver.c will handle HID devices like the GC adapter, DS3/DS4, etc.

  (I say "will" because this isn't implemented yet)

== TESTING
Haven't actually tried the build to see if it works, but it does
compile.
2017-12-30 04:43:18 +01:00
gblues 8f900de65e Clean up USB VID/PID declarations
== DETAILS

USB Vendor and Product IDs are in little-endian byte order, and they
need to be byteswapped on big-endian systems.

This approach allows us to use the standard hex notation for the VID/HID
values, and give them meaningful names, and only swap on the platforms
that need it. Also prevents having to abuse SWAP16() in the platform-
specific code.
2017-12-30 04:43:03 +01:00
gblues 0f66bc3297 Implement HID read loop, add debug logging
== DETAILS

I haven't figured out how I'm going to get the data read via HIDRead()
funneled back to the adapter--the handle_packet() method doesn't actually
get called anywhere.

I'm probably going to need to do more tweaking to the function pointer
list.

This commit also adds logging for the data read via HIDRead.

== TESTING

I used my "stress test" (which I used to reproduce the crash caused
by the old HID implementation), and it did not crash.
2017-12-30 04:41:30 +01:00
gblues 7954dab835 Progress on I/O handling
== DETAILS

Starting to implement the I/O handling on the HID driver.

The old implementation basically had a never-ending HIDRead() callback
set up, so that callback N would start the read process for invocation
N+1.

We will take the same approach here; but now that the I/O thread is
happenning on its own core, we should be able to let it run full-
throttle without impacting emulator performance.

Of course, this hinges on the callback actually running on the same
core as the syscall was initiated on.

== TESTING
Can confirm that the read_loop_callback gets invoked on the same core
that the HIDRead() was invoked on.
2017-12-30 04:41:25 +01:00