c7d7ae4912
InputCommon/SDL: Code style fixes.
2024-01-15 15:19:41 +01:00
5e6e61c723
InputCommon/SDL: Avoid potential infinite loops from integer truncation.
2024-01-15 15:19:24 +01:00
d657ad5932
InputCommon/SDL: Check for errors from SDL_JoystickNumButtons(), SDL_JoystickNumAxes(), SDL_JoystickNumHats().
2024-01-15 15:18:38 +01:00
959c39133b
InputCommon/SDL: Fix incorrect use of std::vector::assign() and check bounds.
2024-01-15 15:17:32 +01:00
1cca3b24c6
Merge pull request #12085 from SuperSamus/sdl-gamecontroller
...
SDL: Add GameController API, cleanup
2024-01-13 16:37:43 +01:00
51e05f468a
SDL: Add GameController API, cleanup
2024-01-13 16:10:25 +01:00
a8033f164b
Steam Deck: Pad out feature report to 64 bytes
...
Also update the names of the setting post-Steam Deck commits to SDL
Fixes https://bugs.dolphin-emu.org/issues/13412
2024-01-10 19:49:52 -08:00
0ab2bc2287
ControllerInterface: Make FullAnalogSurface inherit IsDetectable()
2024-01-10 12:20:07 +01:00
07c035e659
Core/SystemTimers: Refactor to class, move to System.
2024-01-04 23:35:19 +01:00
e456bef163
Input: Improve Controller Interface devices threading
...
This specific issue was already addressed by https://github.com/dolphin-emu/dolphin/pull/11635
though I felt like there was something more we could do, and wasn't too happy with the
likelihood of devices update calls being skipped (due to `m_devices_population_mutex` being locked).
2023-12-18 21:45:22 +02:00
8cbb2c2e44
Merge pull request #12399 from lioncash/erasing
...
General: Make use of std::erase_if/std::erase where applicable
2023-12-12 20:54:52 +00:00
ded2d55438
ExpressionParser: Avoid some miscellaneous copies
...
Just some trivial copies that can be eliminated or turned into moves.
2023-12-12 14:03:41 -05:00
a5bbeb721a
ExpressionParser: Mark constructors explicit where applicable
...
Makes for consistency with the surrounding code.
2023-12-12 14:00:27 -05:00
ea71a76ea9
ExpressionParser: Pass control qualifiers by const reference
...
These aren't necessarily cheap to copy, since a control qualifier will
have around 3 std::strings inside of it, so passing by value can churn
allocations a little bit.
2023-12-12 13:50:46 -05:00
9aea481e59
ExpressionParser: Make use of std::erase_if
2023-12-12 13:31:58 -05:00
196f8e5123
MappingCommon: Make use of std::erase_if
2023-12-12 13:31:18 -05:00
ac53766058
Merge pull request #12215 from JosJuice/android-si-devices
...
Android: Add more GameCube controller types
2023-11-28 19:21:29 +01:00
2d3bae9c79
SDL: Add default case to switch statement
...
Fix -WSwitch warning about unhandled enum value SDL_NUM_LOG_PRIORITIES.
log_level is initialized to LNOTICE right before the switch statement so
this doesn't cause any behavior changes.
2023-11-10 12:05:20 -08:00
30ce1f2ec2
ControllerInterface/SDL: Remove Xbox 360 controller disabling hack.
2023-10-26 18:04:11 -05:00
d6c0f8e749
Android: Get profile name from core
...
To avoid duplicating information between Kotlin and C++.
2023-10-01 18:47:49 +02:00
53df01f7d8
Merge pull request #12172 from ArcaneNibble/sd
...
Steam Deck: Periodically reenable gyro
2023-09-28 04:10:27 +02:00
63467559b2
fmt 10.0.0-10.1.1 compile fixes
...
Implicit conversion operators and enums was removed for parity with std::format (fce74caa15
).
2023-09-21 01:19:23 +02:00
860acfb15d
Steam Deck: Periodically reenable gyro
2023-09-07 19:56:58 +01:00
2502e412b3
Merge pull request #12117 from JosJuice/config-callback-cpu
...
Don't call RunAsCPUThread in config callbacks
2023-08-26 16:34:46 +02:00
9a51215af3
Merge pull request #12083 from JosJuice/android-controlled-by-gamepad
...
InputConfig: Update IsControllerControlledByGamepadDevice for Android input overhaul
2023-08-18 21:27:26 +02:00
7197e3abd0
Use structs for config callback IDs
...
This way you can't mix up regular config callback IDs and CPU thread
config callback IDs. (It would be rather bad if you did!)
2023-08-17 19:19:26 +02:00
2cbc1e6f3e
Merge pull request #12109 from JosJuice/android-adddevice-null
...
ControllerInterface/Android: Add null check to AddDevice
2023-08-15 22:22:45 +02:00
1d77bddc3b
ControllerInterface/Android: Add null check to AddDevice
...
The Google Play Console is showing some users getting a crash here,
and indeed, InputDevice.getDevice can return null.
2023-08-15 13:31:18 +02:00
274b11e4e9
GCAdapter: Fix Android unused constant warning
...
CONTROLLER_OUTPUT_INIT_PAYLOAD_SIZE is only used by the libusb
implementation.
2023-08-12 20:20:42 -07:00
77d33d61de
GCAdapter: Fix spelling of constants
2023-08-12 20:20:41 -07:00
02b0e287cb
InputConfig: Update IsControllerControlledByGamepadDevice for Android input overhaul
...
This only matters for analytics, but still.
2023-08-01 19:35:55 +02:00
5d0f1bd10b
Switch libusb_config_descriptor to RAII type
2023-07-05 20:38:22 -07:00
c893ccca58
Workaround GC adapter detection breaking when reset fails
2023-07-05 20:38:22 -07:00
559a16da49
Reset GC adapter upon IO error after sleep-wake
...
Fixes GC adapter breaking on sleep-wake on Linux and burning a full CPU
core. This is cleaner than alternative approaches.
2023-07-05 20:38:22 -07:00
afb5eff426
Don't burn a CPU core and spam logs when GC Adapter fails
2023-07-05 20:38:22 -07:00
54850e936c
Fix memory leak in libusb code
2023-07-05 20:38:22 -07:00
fa81006b51
Merge pull request #11955 from TellowKrinkle/CMakeDependencies
...
CMake: Allow ignoring system packages
2023-06-30 19:06:04 +02:00
5d7b5822c9
Merge pull request #11972 from Minty-Meeo/string-improvements-part-1c
...
Replace std::ostringstream usage with fmt::format
2023-06-19 02:18:30 +02:00
ffabb6c57b
Replace std::ostringstream usage with fmt::format
2023-06-18 18:37:32 -05:00
80575c4489
DITConfiguration: Use File::ReadFileToString
2023-06-17 19:38:15 -05:00
5b10a80401
CMake: Use targets for all optionally-external dependencies
2023-06-15 01:41:41 -05:00
527f8e783c
ControllerEmu: Convert Translatability to enum class
2023-06-12 18:11:04 -07:00
7845fb00ee
Merge pull request #11681 from iwubcode/asset_management
...
VideoCommon: migrate texture packs to use the asset loader system
2023-06-08 22:21:12 +02:00
e8c87dc4fd
Merge pull request #11902 from Minty-Meeo/regex-best-practices
...
static const std::regex
2023-06-08 20:52:11 +02:00
1df482d51f
Prefer static const std::regex
...
std::regex has a relatively expensive constructor, and these are unchanging regexes.
2023-06-08 09:39:23 -05:00
e831d7b6bb
InputCommon / VideoCommon: remove dynamic input reloading the texture cache, this is no longer needed, assets reload automatically!
2023-06-07 18:30:10 -05:00
71ac6ec239
InputCommon: Don't treat two analog inputs as a spurious trigger combo
...
I've received a report from an Android user with a gamepad (a "BSP-D3")
where one physical trigger is controlling two analog axes at the same
time. This was causing RemoveSpuriousTriggerCombinations to delete both
axes, which is clearly not a desireable outcome.
With this change, now the axis with the greatest smoothness is kept,
or both in case they have the same smoothness.
2023-06-06 22:07:14 +02:00
38b033a476
Merge pull request #11762 from jbosboom/xinput2-raw-event-query
...
Xinput2: use raw events and queries
2023-06-06 18:14:51 +02:00
da77084d2f
Merge pull request #11819 from JosJuice/android-input-device-null
...
ControllerInterface/Android: Use InputEvent.getDeviceId
2023-05-29 19:27:30 +02:00
620955d397
XInput2: Listen to master devices only
...
A comment removed by this commit gives two reasons for listening to
slave devices, both of which no longer apply:
- "Only slaves emit raw motion events": perhaps this was true when the
comment was written, but now master devices provide raw motion events
along with the other raw events.
- "Selecting slave keyboards avoids dealing with key focus": we get raw
key events regardless of the focus.
Listening to both master and slave devices results in duplicate raw
events. For button and key events, that's a tiny waste of time setting
the update flag a second time, but for raw mouse events the raw motion
will be processed twice. That makes this commit a user-facing change.
2023-05-19 14:20:10 -07:00