dolphin/Source/Core
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
..
AudioCommon Fix DTK audio not working after loading a savestate 2017-11-06 09:15:14 +01:00
Common Merge pull request #5973 from ligfx/renamefifoqueue 2017-11-19 13:51:22 +01:00
Core GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
DiscIO VolumeGC: Correct printf specifier in LoadBannerFile() 2017-11-19 00:54:47 -05:00
DolphinNoGUI UI: Implement a command line option to boot NAND title 2017-10-24 11:41:55 +02:00
DolphinQt2 Merge pull request #6186 from lioncash/enum-class 2017-11-19 15:08:16 +01:00
DolphinWX Merge pull request #6186 from lioncash/enum-class 2017-11-19 15:08:16 +01:00
InputCommon GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
UICommon Config: Flatten structures 2017-11-15 18:04:40 +00:00
VideoBackends Merge pull request #6186 from lioncash/enum-class 2017-11-19 15:08:16 +01:00
VideoCommon Merge pull request #6186 from lioncash/enum-class 2017-11-19 15:08:16 +01:00
CMakeLists.txt Moved NoGUI out of DolphinWx. 2017-03-08 01:24:18 -08:00