dolphin/Source/Core/InputCommon/ControllerInterface
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 ControllerInterface: replace Reinitialize with RefreshDevices 2016-11-30 16:07:55 -08:00
DInput Fix minor formatting issues 2017-06-05 02:32:19 +02:00
ForceFeedback Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
OSX Prevent multiple HID elements of same usage type on OSX 2017-09-15 19:19:46 +02:00
Pipes StringUtil: Make SplitString return by value 2017-06-11 16:48:20 +02:00
Quartz Add headless support on macOS 2017-04-15 19:34:42 -07:00
SDL ControllerInterface: replace Reinitialize with RefreshDevices 2016-11-30 16:07:55 -08:00
XInput Ignore capabilities reported by an XInput device 2017-08-09 22:51:01 -05:00
Xlib ControllerInterface: replace Reinitialize with RefreshDevices 2016-11-30 16:07:55 -08:00
evdev evdev: Correctly calculate axis range for min values greater than 0. 2017-11-11 02:07:04 -05:00
ControllerInterface.cpp InputCommon: Extract ControlReference from ControllerInterface 2017-02-07 22:59:10 -08:00
ControllerInterface.h Add missing "functional" include 2017-02-20 14:25:55 +00:00
Device.cpp GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
Device.h GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00