dolphin/Source
Michael Maltese c62d83a34b GCPadEmu: only connected if default device connected
This lets Dolphin know if a configured GameCube Controller should actually
be treated as connected or not.

Talked to @JMC47 a bit about this last night. My use-case is that all of
my controllers are the same hardware (Xbox One controllers) so share the
same configuration (modulo device number). Treating them all as always
connected isn't a problem for most games, but in some (Smash Bros.) it
forces me to go find a keyboard/mouse and unconfigure any controllers
that I don't actually have connected. Hotplugging devices (works on macOS,
at least) + this patch remove my need to ever touch the Controller Config
dialog while in a game.

This patch makes the following changes:

- A new `BooleanSetting` in `GCPadEmu` called "Always Connected", which
  defaults to false.
- `ControllerEmu` tracks whether the default device is connected on every
  call to `UpdateReferences()`.
- `GCPadEmu.GetStatus()` now sets err bit to `PAD_ERR_NO_CONTROLLER` if
  the default device isn't connected.
- `SIDevice_GCController` handles `PAD_ERR_NO_CONTROLLER` by imitating the
  behaviour of `SIDevice_Null` (as far as I can tell, this is the only use
  of the error bit from `GCPadStatus`).

I wanted to add an OSD message akin to the ones when Wiimotes get
connected/disconnected, but I haven't yet found where to put the logic.
2017-11-19 16:07:00 +01:00
..
Android Android: Handle a database downgrade. 2017-11-09 18:54:04 -08:00
Core GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
DSPSpy DSPSpy: Add a test for accelerator loop 2017-09-22 20:17:38 +02:00
DSPTool DSPTool: Fix build 2017-09-13 17:38:23 +02:00
PCH msvc: bump the required _MSC_FULL_VER 2017-06-03 18:20:41 -07:00
UnitTests Merge pull request #5973 from ligfx/renamefifoqueue 2017-11-19 13:51:22 +01:00
VSProps Only build OpenAL on Windows 2017-06-27 00:06:14 -07:00
.clang-format clang-format: Sort windows.h before other headers 2017-01-23 00:35:09 -08:00
CMakeLists.txt CMake: don't use -std=c++1z 2017-09-27 16:06:15 -07:00
dolphin-emu.sln msbuild: put pugixml in Externals solution filter; fix project reference. 2017-06-15 19:06:16 -07:00