Connor McLaughlin
428ae5a43d
Merge pull request #8172 from nokturnusmf/relative-input-hold
...
Added (held) key for relative input
2019-08-10 00:37:53 +10:00
Connor McLaughlin
48ca2c6f2e
Merge pull request #8233 from JosJuice/stringutil-string-view
...
StringUtil: Use std::string_view more
2019-08-09 23:39:01 +10:00
Lioncash
37d643c7d3
InputCommon/DInputJoystick: Correct force-feedback flag testing
...
Introduced in a995e2f5ba
We need to be performing a bitwise AND on the flags and not a logical
AND, otherwise we could end up counting device objects that don't
support forced feedback.
2019-08-02 10:26:44 -04:00
JosJuice
a2a1e04fc9
StringUtil: Use std::string_view more
2019-07-23 14:49:12 +02:00
Léo Lam
cf60a9a7f7
Use separate libusb contexts to avoid thread safety issues
...
Unfortunately, it appears that using libusb's synchronous transfer API
from several threads causes nasty race conditions in event handling and
can lead to deadlocks, despite the fact that libusb's synchronous API
is documented to be perfectly fine to use from several threads (only
the manual polling functionality is supposed to require special
precautions).
Since usbdk was the only real reason for using a single libusb context
and since usbdk (currently) has so many issues with Dolphin, I think
dropping support for it in order to fix other backends is acceptable.
2019-06-26 17:55:51 +02:00
Lioncash
ec60027f56
InputCommon: Use nested namespace specifiers where applicable
2019-06-17 16:51:41 -04:00
Matthew Foulds
c62570c527
Added key for relative input
2019-06-10 13:23:16 +01:00
Connor McLaughlin
bed2d66bed
Merge pull request #8117 from weihuoya/threaded_env
...
android: get java env from thread local storage
2019-06-08 20:42:15 +10:00
Lioncash
c0c0e412e0
Core/ConfigManager: Use forward declarations where applicable
...
Avoids dragging in IniFile, EXI device and SI device headers in this header which is
quite widely used throughout the codebase.
This also uncovered a few cases where indirect inclusions were being
relied upon, which this also fixes.
2019-06-07 19:54:39 -04:00
Lioncash
24f5acf9a5
InputCommon/CMakeLists: Specify headers in target sources
2019-05-31 06:54:25 -04:00
Léo Lam
00ecfb3c59
Merge pull request #8138 from lioncash/input-string
...
ControllerInterface/Device: Minor cleanup
2019-05-30 14:33:53 +02:00
Lioncash
0263435050
ControllerInterface/Device: Make DetectInput() a const member function
...
This doesn't actually modify object instance state, so it can be made
const.
2019-05-29 19:23:54 -04:00
Lioncash
27346fee8a
ControllerInterface/Device: Take vector by const reference in DetectInput()
...
The vector is only ever queryied and it's contents aren't modified, so
there's no reason to take the vector by value. We can take a constant
reference to it to avoid unnecessary allocating.
2019-05-29 19:12:21 -04:00
Lioncash
246e2a77ce
ControllerInterface/Device: std::move strings in constructor where applicable
...
Allows callers to move std::string values into the constructor,
potentially avoiding copies.
2019-05-29 18:46:49 -04:00
Lioncash
1355b43fd2
ControllerInterface/Device: Use std::string_view where applicable
...
In these cases, the given string is only ever compared against other
string, so std::string can be turned into a std::string_view to allow
non-allocating inputs.
2019-05-29 18:42:24 -04:00
Vincent Duvert
2c3c8bbb90
GCAdapter: Update Android-specific source
...
Fix the Android version of GCAdapter.cpp so it matches the new definitions in GCAdapter.h.
2019-05-29 18:28:24 +02:00
Vincent Duvert
9e7d4d2abb
GCAdapter: Handle dynamic status updates for non-hotplug libusb
...
Detect when the setup function found no adapter, or found one but could
not connect to it, and report the new status in that case.
2019-05-29 18:28:24 +02:00
Vincent Duvert
2ac1ca133f
GCPadWiiUConfigDialog: Update the adapter state dynamically
...
Update the GC adapter config GUI if the adapter is plugged or unplugged.
2019-05-29 18:28:24 +02:00
Vincent Duvert
b08e2ec959
GCAdapter: Report libusb open errors to the user
...
If opening the adapter fails, report the libusb error message in the GUI
instead of “No Adapter Detected”.
The error condition is removed when the adapter is unplugged.
2019-05-29 18:28:24 +02:00
Vincent Duvert
0165e5e703
GCAdapter: Close libusb handle if an open error occurs
...
The handle was previously kept open, which was causing future adapter
plug/unplug events to be ignored.
2019-05-29 18:28:24 +02:00
weihuoya
0dec8feadb
android: thread local env
2019-05-29 20:22:26 +08:00
Léo Lam
256c9375c9
Move libusb utilities to LibusbUtils
...
* Simplifies libusb context usage and allows us to set options for
all contexts easily. Notably, this lets us enable usbdk support
in libusb, which is now opt-in in the latest version.
* Moves the libusb config descriptor wrapper class to LibusbUtils too
since that could easily be reused.
* Moves device listing to LibusbUtils too and add a lock around it
as some libusb backends are not thread safe.
* Consequences: only a single context and a single event handling
thread is used now, which is more efficient.
2019-05-27 20:09:55 +02:00
Léo Lam
e2c769a9c5
Merge pull request #7992 from artemist/centering
...
ControllerEmu: Add support for setting the center of a ReshapableInput
2019-05-20 18:29:31 +02:00
Artemis Tosini
49e46c8aff
ControllerEmu: Add support for setting the center of a ReshapableInput
...
This is useful in far out-of-calibration controllers, such as the
Switch Pro controller. This also adds support for configuring the center
in the Mapping widget.
2019-05-18 14:45:16 +00:00
spycrab
ec734065db
Merge pull request #8087 from spycrab/cmake_win2019
...
Support CMake on Windows
2019-05-14 21:07:26 +02:00
Jordan Woyak
374585f128
WiimoteEmu/DolphinQt: Rename "IR" to "Point" and eliminate redundant Forward/Backward mappings.
2019-05-08 20:27:41 -05:00
spycrab
12a26453e9
InputCommon/ControlGroup.h: Add missing include
2019-05-08 21:03:11 +02:00
spycrab
7eaece8814
InputCommon/Device.cpp: Add missing include
2019-05-08 21:02:26 +02:00
spycrab
98d808ab71
InputCommon/DInput.h: Add missing include
2019-05-08 21:01:46 +02:00
Techjar
ff972e3673
Reformat repo to clang-format 7.0 rules
2019-05-06 18:48:04 +00:00
Léo Lam
ab9ece9bca
Replace MathUtil::Clamp with std::clamp
2019-05-04 23:12:17 +02:00
Jordan Woyak
99f537d499
WiimoteEmu/DolphinQt: Better extension display names.
2019-05-01 17:25:48 -05:00
Jordan Woyak
57a23cc4a0
InputCommon: Remove unused "sign" macro.
2019-04-29 18:28:56 -05:00
Jordan Woyak
9f0dc402f4
InputCommon: Make sure setting values are initialized in case they are used before config load.
2019-04-27 07:01:24 -05:00
Jordan Woyak
ba1b335118
WiimoteEmu: Improve emulated swing.
2019-04-23 19:02:41 -05:00
Jordan Woyak
4374600367
WiimoteEmu: Implement MotionPlus parameter y0 and other cleanups.
2019-04-23 18:38:00 -05:00
Jordan Woyak
8c1310d1d1
ControllerInterface/DInput: Optimize cursor position updating.
2019-04-20 09:25:11 -05:00
JMC47
80d21b8ffb
Merge pull request #8002 from JMC47/CursorSlowdown
...
Slow down relative input cursor
2019-04-15 20:43:31 -04:00
JMC47
f3aaf5deaa
Reduce Relative Input Cursor Speed Dramatically
...
This makes it about 1/4th the speed which may be a bit slow, but should
work for most controllers.
2019-04-15 17:23:17 -04:00
JMC47
1cedbd5b82
Merge pull request #7923 from jordan-woyak/full-surface-rename
...
ControllerInterface: Rename full surface analog inputs.
2019-04-13 17:43:29 -04:00
Jordan Woyak
be897b41a7
ControllerInterface: Rename full surface analog inputs to be more visually dissimilar from their underlying inputs. e.g. "Full Axis X+".
2019-04-13 08:45:19 -05:00
Jordan Woyak
c89ddf8cba
WiimoteEmu: Allow shake frequency and intensity to be configured. Other minor cleanups.
2019-04-12 16:50:59 -05:00
Jordan Woyak
5efb717873
InputCommon: Clean up how numeric settings are handled. Add units of measure to UI. Eliminate hidden magic values of the IR cursor.
2019-04-07 09:32:49 -05:00
JMC47
75e74315e6
Merge pull request #7689 from jordan-woyak/sdl-improve
...
ControllerInterface: SDL cleanups/fixes
2019-04-06 14:53:51 -04:00
Jordan Woyak
2b6d718636
InputCommon: Fix Win32 init race.
2019-03-31 07:46:58 -05:00
JMC47
735a705e4d
Merge pull request #7776 from jordan-woyak/wm_devicechange
...
Add hotplug support to DInput and XInput controller backends
2019-03-30 18:41:46 -04:00
Jordan Woyak
eadbdd6bc3
ControllerInterface/Win32: Prevent devcies from losing their "id" on a hotplug event.
2019-03-29 09:04:16 -05:00
Michael M
d26c1ce24d
Add hotplug support to DInput and XInput controller backends
2019-03-29 08:01:40 -05:00
Michael M
92ca6e124e
Add ControllerInterface::Win32 to wrap XInput and DInput
2019-03-29 08:01:39 -05:00
Jordan Woyak
a015851b02
HW/SI: GCAdapter calibration fix.
2019-03-29 06:15:58 -05:00