Commit Graph

514 Commits

Author SHA1 Message Date
9f43f59c9b Merge pull request #13276 from JoshuaVandaele/sfml-3.0.0
Migrate to SFML 3.0.0
2025-03-10 15:03:36 -04:00
e217d6c939 InputCommon: Use Clock from CommonTypes. 2025-03-02 15:42:26 -06:00
0a83783fae Migrate to SFML>=3.0.0 2025-02-25 06:42:13 +01:00
6e7e808b66 DolphinQt/Mapping: Add setting to enable waiting for alternate mappings
using the OR-operator.
2025-02-01 01:54:10 -06:00
8354279aae InputCommon: Add support for SDL gamecontroller rumble triggers. 2025-01-21 21:09:39 -06:00
fb512adc5f InputCommon: Make SDL Motor L/R Outputs not fight each other. 2025-01-21 19:19:01 -06:00
bc95c001c8 InputCommon: Move input mapping function into a class for non-blocking usage. 2025-01-01 16:48:32 -06:00
110d32729e Simplify std::find with Common::Contains
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp).

The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
2025-01-01 09:52:03 -08:00
532a8621da Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
2024-12-26 16:51:53 -05:00
1ba8541da9 Merge pull request #13091 from mitaclaw/ranges-modernization-2-returns
Ranges Algorithms Modernization - Return
2024-12-20 12:50:19 -05:00
140252ffc0 Modernize std::any_of with ranges
In WiimoteReal.cpp, JitRegCache.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.

In ConvertDialog.cpp, the `std::mem_fn` helper was removed because ranges algorithms are able to handle pointers to member functions as predicates.
2024-12-15 19:54:16 -08:00
860e6cf5cb Modernize std::all_of with ranges
In DITSpecification.cpp, MaterialAsset.cpp, and ShaderAsset.cpp, lambda predicates were replaced by pointers to member functions because ranges algorithms are able invoke those.

In NetPlayClient.cpp, the non-trivial `NetPlay::Player` elements were being passed by value in `NetPlayClient::DoAllPlayersHaveGame()`. This has been fixed.

In WIABlob.cpp, the second example's predicate was returning the `std::optional` by value instead of implicitly converting it to a bool. This has been fixed.
2024-12-15 19:50:34 -08:00
ad1511982a InputCommon/SDL: Add touchpad inputs. 2024-12-04 21:08:18 -06:00
8c3b9c9cf6 Merge pull request #13174 from jordan-woyak/sdl-battery
ControllerInterface/SDL: Add Battery Input.
2024-12-04 21:46:07 -05:00
0f2c2c7ae0 Merge pull request #13156 from jordan-woyak/sdl-no-wgi
ControllerInterface/SDL: Disable SDL's Windows.Gaming.Input controller handling.
2024-11-17 21:51:56 +01:00
83ed817ad2 ControllerInterface/SDL: Add Battery Input. 2024-11-04 22:24:42 -06:00
346a9e0f97 InputCommon: Move FullAnalogSurface class definition out of header file. 2024-11-03 15:06:50 -06:00
2f1390e9f9 InputCommon: Rename AddAnalogInputs to AddFullAnalogSurfaceInputs. 2024-11-03 15:06:50 -06:00
2f38a00534 InputCommon: Disable DualSense Player LED 2024-11-02 16:49:36 -07:00
d361d4ba6e ControllerInterface/SDL: Fix device removal event processing. 2024-10-31 14:11:27 -05:00
19c3b88e5a ControllerInterface/SDL: Disable SDL's Windows.Gaming.Input controller handling. 2024-10-30 17:41:09 -05:00
5f3a8ff0de Modernize std::unique with ranges
The new return value is `std::ranges::subrange`.
2024-10-17 18:39:12 -07:00
07605bf67c Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
2024-10-15 17:08:55 +02:00
e8d5fb89e4 C++20: Synthesize operator!= From operator==
The inequality operator is automatically generated by the compiler if `operator==` is defined.
2024-10-10 20:23:55 -07:00
ebf7cebc32 Modernize std::sort with ranges 2024-10-10 00:53:48 -07:00
9bd1dae41d Modernize std::fill with ranges
In DSPCore.cpp, there were two `std::fill` uses that could be simplified using `std::fill_n`. Due to their proximity with other `std::fill` algorithms being modernized with ranges, I chose to make these examples into the rare `std::ranges::fill_n`.
2024-10-10 00:53:48 -07:00
4cc5e1972a Modernize std::count_if with ranges 2024-10-10 00:53:48 -07:00
5f90673686 StringUtil: Remove JoinStrings
With 12 uses of `JoinStrings` in the codebase vs 36 uses of `fmt::join`, fmtlib's range adapter for string concatenation with delimiters is clearly the preferred option.
2024-09-22 21:09:36 -07:00
9602f36248 Remove redundant semicolons 2024-08-20 14:59:54 +02:00
de1c47a701 Misc. Container Find Changes 2024-08-15 14:25:51 -07:00
9fa4eb9aab Use 'contains' method 2024-08-15 14:20:16 -07:00
618b41a459 Use 'contains' method 2024-08-14 22:18:28 +02:00
d627b78c46 Adjust order and spacing of various #includes
Move some #includes around to match the Contributing guidelines.
2024-07-26 14:28:34 -07:00
982893b04c Use C++20 erase_if() instead of erase(remove_if()) (NFC) 2024-07-21 16:36:06 +01:00
ed4a09fa56 Merge pull request #12850 from jordan-woyak/device-sorting
ControllerInterface: Adjust sort priorities to ensure default keyboard-mouse device is first.
2024-06-15 21:12:08 +02:00
42e73547eb ControllerInterface: Adjust sort priorities to ensure default keyboard-mouse device is first. 2024-06-15 12:41:25 -05:00
c3bdd05d2a TAS Input: Enable hotkeys and controller input when Input has focus
Enable emulator hotkeys and controller input (when that option is
enabled) when a TAS Input window has focus, as if it was the render
window instead.  This allows TASers to use frame advance and the like
without having to switch the focused window or disabling Hotkeys Require
Window Focus which also picks up keypresses while other apps are active.

Cursor updates are disabled when the TAS Input window has focus, as
otherwise the Wii IR widget (and anything else controlled by the mouse)
becomes unusable. The cursor continues to work normally when the render
window has focus.
2024-05-31 15:14:44 -07:00
5456d990d1 Android/ControllerInterface: Run the init code
This was broken by a9a9fdd9e9. Because Init didn't run, the Android
input backend would crash whenever it tried to call into JVM code.
2024-04-13 22:39:10 +02:00
e62d8ecfa8 Merge pull request #12632 from jordan-woyak/input-backend-impls
Implement missing InputBackend classes.
2024-04-13 11:56:27 +01:00
d1db347c8a evdev: close file descriptors in a separate thread
For some reason Linux is surprisingly slow at closing file descriptors
of event devices. This commit improves GUI startup times on my computer
by about 1.5 seconds.
2024-04-06 20:58:17 +01:00
4421cc471d Merge pull request #12631 from jordan-woyak/remove-osx-input-leftovers
InputCommon: Remove some IOKit leftovers.
2024-04-01 17:05:13 -04:00
3a85725ffa SDL: Remove duplicate button/hat Inputs. Hide duplicate Axis Inputs. 2024-03-14 23:50:17 -05:00
ee43c9508c ControllerInterface: Add IsHidden function to Control interface. 2024-03-14 23:43:58 -05:00
0538366326 SDL: Deduplicate Motor logic with templates. 2024-03-14 23:43:58 -05:00
0fff8374d0 SDL: Move class definition out of header. 2024-03-14 23:43:58 -05:00
c3903fcc7e InputCommon/WiimoteController: Add inputs that report the raw IR objects seen by the Wiimote. 2024-03-11 22:46:05 +01:00
a9a9fdd9e9 InputCommon: Add Android InputBackend class. 2024-03-11 03:25:31 -05:00
8583b6751a InputCommon: Handle window change in Quartz. 2024-03-11 03:25:31 -05:00
3665f7abac InputCommon: Implement xlib window change logic. 2024-03-11 03:25:31 -05:00
341f99a3f1 InputCommon: Add Win32 InputBackend class. 2024-03-11 03:25:31 -05:00