| Age | Commit message (Collapse) | Author |
|
Simpler usage.
|
|
Add headless support on macOS
|
|
These were not caught by the lint script while it was broken.
|
|
Makes comparison logic symmetric
|
|
|
|
Building fails on GCC7 without an explicit
|
|
Better separation of concerns. Relegates `ControllerInterface` to
enumerating input controls, and the new `ControlReference` deals with
combining inputs and configuration expression parsing.
|
|
|
|
|
|
|
|
GetName() creates a new evdev device which calls tons of ioctls. But the
main culprit is close() which for input devices appears to be a slow
path in the kernel.
This commit reduces PopulateDevices() by 50% on my laptop, but ~730 ms
is still ridiculously slow for something that isn't needed right away.
|
|
|
|
Note: This probably means our approach of populating from udev isn't
safe to be called multiple times.
|
|
ControllerInterface: enable hotplugging on macOS
|
|
|
|
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
|
|
The SDL backend faults if it tries to close a joystick after SDL_Quit
has been called.
|
|
Make analog triggers on PS3 controllers accessible on Mac
|
|
Warning fixes
|
|
Previously the 'usage' value was used to identify the axis by name, but this is not unique. For example on a PS3 controller *all* axis other than the well known ones return a usage of '1' so there are 30 or more axis all named "1". This stops things such as analog triggers being usable.
Using the element cookie uniquely identifies each axis and allows them to be assigned successfully as controls
|
|
|
|
|
|
This wasn't caught by the lint script because it was broken (by me) at
some point :(
If it had been rebased, it wouldn't have passed lint
|
|
InputCommon: Fix slow startup on some Windows systems with language packs (Issue 9744)
|
|
Add Quartz/CoreGraphics controller interface for default k&m events
|
|
The XInput2 backend is more performant, so let's default to it and
remove the old, core-only backend.
|
|
This should cut down on round trips and blocking calls dramatically
during gameplay.
|
|
Rewrite GetXInputGUIDS to use SetupAPI instead of WMI Queries. When
using a language pack where the system language and user/program
language differ, Windows starts taking a VERY long time (10+ seconds)
to complete Queries for Win32_PNPEntity objects (it's probably
translating every single string since it transfers every single one
from the WMI server into memory in the program).
Fixes Issue 9744.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
There is no reason to prevent the user from closing the config dialog
if the device is not found. It's not very good UX…
Also fixes ExpressionParser to return NO_DEVICE if the device doesn't
exist instead of SUCCESS.
|
|
This adds hotplugging support to the evdev input backend. We use
libudev to monitor changes to input devices in a separate thread.
Removed devices are removed from the devices list, and new devices
are added to the list.
The effect is that controllers are usable immediately after plugging
them without having to manually refresh devices (if they were
configured to be used, of course).
|
|
Changes UpdateInput() to skip if we can't lock the mutex, instead of
potentially blocking the CPU thread and causing a short but noticeable
frame drop.
|
|
This adds RemoveDevice() to ControllerInterface, fixes ExpressionParser
and some other code to support device removals without crashing,
and adds an IsValid() method to Device, to prepare for hotplugging.
|
|
This adds RegisterHotplugCallback() to register a callback which will
be invoked by the input backends' hotplug threads when there is a new
device, so that Core (GCKeyboard, GCPad, Wiimote, Hotkey) can reload
the configuration without adding a dependency to Core from InputCommon.
|
|
This makes the device ID assigning code common to all backends, by
moving it to AddDevice() instead of copy-pasting or replicating
the logic in the backends.
Also, to prepare for hotplugging, instead of relying on a name usage
count, the new ID assigning system always starts from ID 0 and tries
to assign the first ID that is not used.
|
|
|
|
The values are expected to be in the 0.0-1.0 range (as indicated by the
comment), and other parts of Dolphin also expect it to be in that range
since the "full" axis has a -1.0 to 1.0 range. However, this is not
always the case and fvalue can end up being outside of the range. This
clamps fvalue to always be in the 0.0 and 1.0 range.
|
|
ControllerInterface: Include memory to fix building without pch
|
|
|
|
All affected files use shared_ptr but do not include memory which breaks
building without precompiled headers.
|
|
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.
|
|
|
|
Since we may have to add/access devices from different threads, this
adds synchronisation to anything that touches m_devices.
|
|
Previously, the devices vector would be passed to all backends. They
would then manually push_back to it to add new devices. This was fine
but caused issues when trying to add synchronisation.
Instead, backends now call AddDevice() to fill m_devices so that it is
not accessible from the outside.
|
|
|