dolphin/Source/Core/Core/HW
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
..
DSPHLE DSP: Fix ACCOV not suspending accelerator reads 2017-09-24 20:48:29 +02:00
DSPLLE DebugInterface: Rename InsertBLR to Patch 2017-10-05 20:22:16 +02:00
DVD Merge pull request #5973 from ligfx/renamefifoqueue 2017-11-19 13:51:22 +01:00
EXI Externals: update cubeb to kinetiknz/cubeb@c2bd582 2017-10-21 14:28:39 -07:00
GCMemcard Remove NonCopyable 2017-08-22 16:40:34 +02:00
SI GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
WiimoteCommon Core: Add WiimoteCommon headers to the VS project 2017-06-15 18:38:21 -04:00
WiimoteEmu WiimoteEmu: Don't set pack pragma for STL objects. 2017-11-05 13:13:25 +01:00
WiimoteReal Merge pull request #5973 from ligfx/renamefifoqueue 2017-11-19 13:51:22 +01:00
AudioInterface.cpp Fix DTK audio not working after loading a savestate 2017-11-06 09:15:14 +01:00
AudioInterface.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
CPU.cpp AudioCommon: rename ClearAudioBuffer(mute) to SetSoundStreamRunning(running) 2017-10-21 16:28:04 -07:00
CPU.h Jit64: Use a temporary register for memory references. Part 1. 2017-04-12 20:53:17 +02:00
DSP.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
DSP.h AX-HLE: delay sending interrupt when done processing command list 2017-05-19 19:04:06 -07:00
GCKeyboard.cpp ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
GCKeyboard.h ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
GCKeyboardEmu.cpp Move 'Background Input' to controller config dialog 2017-03-13 13:43:20 -07:00
GCKeyboardEmu.h ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
GCPad.cpp ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
GCPad.h ControllerEmu: Separate ControlGroup from ControllerEmu 2017-02-09 18:18:52 -05:00
GCPadEmu.cpp GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
GCPadEmu.h GCPadEmu: only connected if default device connected 2017-11-19 16:07:00 +01:00
GPFifo.cpp Jit64: Inline GP fast check in Cleanup. 2017-11-18 17:43:38 +01:00
GPFifo.h Jit64: Inline GP fast check in Cleanup. 2017-11-18 17:43:38 +01:00
HW.cpp Initialise WiiRoot once per emulation session 2017-06-27 15:44:17 +02:00
HW.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Memmap.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
Memmap.h Memmap: Remove unnecessary const on function declaration parameters 2017-03-06 14:08:07 -05:00
MemoryInterface.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
MemoryInterface.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
MMIO.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
MMIO.h MMIO: Get rid of a TODO regarding tuples 2017-01-27 02:54:07 -05:00
MMIOHandlers.h Remove NonCopyable 2017-08-22 16:40:34 +02:00
ProcessorInterface.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
ProcessorInterface.h Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
Sram.cpp Move IOFile to a separate file 2017-06-15 21:33:50 +02:00
Sram.h Sram: Make SRAM dumps const 2017-01-30 17:44:03 -05:00
StreamADPCM.cpp Fix DTK audio not working after loading a savestate 2017-11-06 09:15:14 +01:00
StreamADPCM.h Fix DTK audio not working after loading a savestate 2017-11-06 09:15:14 +01:00
SystemTimers.cpp Common: Move version strings to their own header 2017-09-09 19:28:10 -04:00
SystemTimers.h IOS: Implement MIOS functionality 2017-02-08 15:07:34 +01:00
VideoInterface.cpp HybridXFB: Fix lint errors 2017-11-17 22:11:31 -06:00
VideoInterface.h FifoPlayer: Generate fake VideoInterface updates 2017-11-17 22:11:29 -06:00
WII_IPC.cpp Core: Remove unnecessary includes 2017-06-15 18:52:22 -04:00
WII_IPC.h IPC_HLE: Namespace IOS HLE 2017-01-17 20:46:58 -05:00
Wiimote.cpp Fix the size of s_last_connect_request_counter to be 5 (wiimotes + balance board) 2017-08-04 00:32:20 -05:00
Wiimote.h Sync info about pressed wiimote button 2017-08-01 20:56:45 +02:00
WiiSaveCrypted.cpp Change Wii Save Import alerts 2017-09-29 20:13:14 +10:00
WiiSaveCrypted.h Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00