summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/Device.cpp
AgeCommit message (Collapse)Author
2017-12-15Merge pull request #6166 from ligfx/invokedeviceschangedcallbacksLeo Lam
ControllerInterface: cleanup callbacks API and logic
2017-11-19DeviceQualifier: small cleanupMichael M
2017-11-19GCPadEmu: only connected if default device connectedMichael Maltese
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-10ControllerInterface: invoke callbacks in AddDevice/RemoveDeviceMichael M
Some backends already cause this to happen, so make it consistent across systems.
2017-06-03Device: Provide operator!= counterparts to operator== for DeviceQualifierLioncash
Makes comparison logic symmetric
2017-02-07InputCommon: Extract ControlReference from ControllerInterfaceMichael Maltese
Better separation of concerns. Relegates `ControllerInterface` to enumerating input controls, and the new `ControlReference` deals with combining inputs and configuration expression parsing.
2016-06-26Merge pull request #3943 from ShadowsFriend/nopch-fixMat M
ControllerInterface: Include memory to fix building without pch
2016-06-25Device: Use std::tie for DeviceQualifier's operator==Lioncash
2016-06-26ControllerInterface: Include memory to fix building without pchChristian Widmer
All affected files use shared_ptr but do not include memory which breaks building without precompiled headers.
2016-06-25ControllerInterface: Switch to std::shared_ptrLéo Lam
Small cleanup by using std::shared_ptr and getting rid of ciface.Devices() which just returned the m_devices (which defeats the point of making m_devices protected). Incidentally, this should make the code safer when we have different threads accessing devices in the future (for hotplug?). A lot of code use Device references directly so there is no easy way to remove FindDevice() and make those unique_ptrs.
2016-06-24Reformat all the things. Have fun with merge conflicts.Pierre Bourdon
2015-05-25Update license headers to GPLv2+Tillmann Karras
2014-11-28ControllerInterface: Remove unused ClearInputStateJasper St. Pierre
2014-07-16Host: Add a new "UIHasFocus" hook to determine if the UI has focusJasper St. Pierre
We can't use RendererHasFocus for this purpose because of some issues with exclusive fullscreen, and the new RendererHasFocus implementation didn't work for non-Render to Main Window cases, since the renderer window wasn't managed by wx.
2014-07-11ControllerInterface: Gate the input based on our new background input settingJasper St. Pierre
2014-03-09clang-modernize -use-nullptrTillmann Karras
and s/\bNULL\b/nullptr/g for *.cpp/h/mm files not compiled on my machine
2014-02-18Convert all includes to relative paths.Lioncash
2014-02-10Replace all include guard ifdefs with "#pragma once"lioncash
2014-01-30Light cleanup to a little bit of InputCommon. Replaces much of the iterators ↵Lioncash
that litter this section of the codebase. Also clean up a little bit of the comments that describe the interface classes.
2013-12-31Remove unnecessary Src/ foldersJasper St. Pierre