summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon
AgeCommit message (Collapse)Author
2018-10-20Update to Visual Studio's default Windows SDKTillmann Karras
2018-10-08evdev: simplify codeTillmann Karras
No need to check write access if we call open() right after which checks that anyway. Also only get the device name once.
2018-09-21Merge pull request #7400 from zackhow/phone-rumbleMarkus Wick
Android: Add rumble for phone
2018-09-16Merge pull request #7262 from lioncash/forceLéo Lam
ControlGroup: Return state data via GetState() by value where applicable
2018-09-08Fix a string not getting translatedJosJuice
2018-09-07Android: Add rumble for phonezackhow
This currently only supports using the internal vibrate on a phone for rumble.
2018-08-27InputCommon/XInput2: Increase mouse buttons to 32Techjar
Xlib supports many mouse buttons, though there are 9 standard buttons, and they aren't arranged like other mouse APIs. Using only 5 buttons was preventing the use of buttons besides left/right/middle click and the scroll wheel. Here's what all the standard buttons are: 1. left button 2. middle button (pressing the scroll wheel) 3. right button 4. turn scroll wheel up 5. turn scroll wheel down 6. push scroll wheel left 7. push scroll wheel right 8. 4th button (aka browser backward button) 9. 5th button (aka browser forward button) The remaining button indices are non-standard and device-specific, and technically far more than 32 are supported, but this seems like a reasonable limit to avoid cluttering the list with tons of useless mouse buttons. What mouse has more than 32 buttons anyways?
2018-07-13ControlGroup/Triggers: Return state data by valueLioncash
Makes it less error-prone to get state data from analog sticks (no need to pass any locals), and also allows direct assignment, letting the retrieved data be const.
2018-07-13ControlGroup/Tilt: Return state data by valueLioncash
Makes it less error-prone to get state data from tilt controls (no need to pass any pointers to locals), and also allows direct assignment, letting the retrieved data be const.
2018-07-13ControlGroup/Slider: Return state data by valueLioncash
Makes it less error-prone to get state data from sliders (no need to pass any locals), and also allows direct assignment, letting the retrieved data be const.
2018-07-13ControlGroup/Force: Return state data by valueLioncash
Ensures that an array of sufficient size is always used and doesn't put the responsibility on the caller. It also allows for direct assignment.
2018-07-13ControlGroup/Cursor: Return state data by valueLioncash
Makes it less error-prone to get state data from cursors (no need to pass any pointers to locals), and also allows direct assignment, letting the retrieved data be const.
2018-07-13ControlGroup/AnalogStick: Return state data by valueLioncash
Makes it less error-prone to get state data from analog sticks (no need to pass any locals), and also allows direct assignment, letting the retrieved data be const.
2018-07-07Input: Allow per-game configuration to specify directories for ↵iwubcode
input-profiles. If specified, the directories are searched recursively for inis
2018-07-07Fix lint bugsiwubcode
2018-07-07Input: Trim profile names to allow spaces between ','siwubcode
2018-07-07InputConfig: Show display message when game specific input profile is ↵iwubcode
loaded; matching how cycling works
2018-07-07Input: Allow cycling to occur for each individual controlleriwubcode
2018-07-07Input: Add cycling between game specific profilesiwubcode
2018-07-07Input: Add hotkey to cycle the wiimote profile forward or backwardiwubcode
Co-authored-by: Barath Kannan <barathsotd@gmail.com>
2018-07-07Wiimote Emulation: Be able to trigger swings consistently by holding down ↵iwubcode
buttons. This makes certain actions easier (tested with Red Steel)
2018-07-02ControllerEmu/BooleanSetting: Add exclusive flagspycrab
2018-06-08Merge pull request #7062 from robopilot99/masterLéo Lam
Add auto-hide option to Wii IR pointer
2018-06-06Use UICommon's game list code on AndroidJosJuice
Deduplicates code, and gets rid of some problems the old code had (such as: bad performance when calling native functions, only one disc showing up for multi-disc games, Wii banners being low-res, unnecessarily much effort being needed for adding more metadata).
2018-06-04Add auto-hide option to Wii IR pointerrobopilot99
2018-06-04Add hotplug support to SDL2 controller backendMichael M
2018-06-04SDLJoystick: store name on creationMichael M
Otherwise, Dolphin will crash when the joystick is removed.
2018-06-04CMake: make SDL a private dep of InputCommonMichael M
2018-04-19THis fixes issue #08 and #16, the rumble test and sliderConnor Roth
2018-04-14Merge pull request #6564 from JosJuice/translate-certain-button-namesLéo Lam
Translate certain button names but not all
2018-04-13Merge pull request #6625 from lioncash/evdev-udevLéo Lam
InputCommon/CMakeLists: Include evdev and udev includes on a by-target basis
2018-04-13ControllerEmu: Use enum instead of bool for translatabilityJosJuice
2018-04-13Translate certain button names but not allJosJuice
Some button names should be translated, for instance Up, Left and such. At the same time, some other button names shouldn't be translated, for reasons that might be less obvious. In 0146456af, I removed the _trans markers for button names that never need to be translated (such as A and B), but that isn't actually enough to ensure that DolphinWX won't try to translate them anyway. This commit adds a bool that explicitly tells the GUI whether a button name should be translated. Otherwise we'll have problems like the GUI treating the button name "B" (which isn't supposed to be translated) as matching the translatable string "B" (being an abbreviation of "bytes"), meaning that the button "B" will be labeled "o" when running Dolphin in French (after translations get pulled from Transifex the next time). By the way, while it turned out that DolphinWX translated all button names, it also turned out that DolphinQt2 translated *no* button names. Go figure. This commit makes them consistent with each other.
2018-04-12Reformat all the things!spycrab
2018-04-10InputCommon/CMakeLists: Link evdev and udev in privatelyLioncash
These libraries aren't directly used outside of InputCommon
2018-04-10InputCommon/CMakeLists: Include evdev and udev includes on a by-target basisLioncash
Avoids including the evdev/udev includes in the top-level directory
2018-03-30CMakeLists: Link in system framework libraries explicitly on macOSLioncash
Makes our libraries explicitly link in which libraries they need. This makes our dependencies explicit and removes the reliance on the LIBS variable to contain the libraries that they need.
2018-03-29InputCommon/CMakeLists: Link in ForceFeedback library explicitly on macOSLioncash
Makes an implicit dependency explicit. Also makes the macOS libraries link privately as they aren't used in the exposed interface.
2018-03-24InputCommon/CMakeLists: Migrate off add_dolphin_libraryLioncash
Continues the migration work started in 3a4c3bbe01e7a44ec997f4fbf0b678fba6f2d46c
2018-03-14Assert: Uppercase assertion macrosLioncash
Macros should be all upper-cased. This is also kind of a wart that's been sticking out for quite a while now (we avoid prefixing underscores).
2018-02-07Merge pull request #6355 from myfreeweb/clang6-warningAnthony
Add -Wno-register to calm down clang 6.0.0 (C++17 mode)
2018-02-05Ignore -Wregister to calm down recent clang and GCC (C++17 mode)Greg V
The 'register' keyword is used by a header included from Xlib (X11/XKBlib.h).
2018-02-05evdev: Always unref received udev devicesLéo Lam
Whenever udev_monitor_receive_device() returns a non-null pointer, the device must be unref'd after use with udev_device_unref(). We previously missed some unref calls for non-evdev devices.
2018-02-04evdev: Don't leak eventfd on shutdownLéo Lam
2018-02-04evdev: Fix select() callLéo Lam
It's not guaranteed that the eventfd is smaller than the monitor fd, because fds are not always monotonically allocated. To select() correctly in all cases, use the max between the monitor fd and eventfd.
2017-12-19Rename constructor parameters to avoid shadowing membersEmmanuel Gil Peyrot
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-19Add GCPadStatus.isConnected booleanMichael Maltese