1415 Commits

Author SHA1 Message Date
Admiral H. Curtiss
77056ba7b7
Merge pull request #13208 from Dentomologist/wiitasinputwindow_update_on_attachment_change
WiiTASInputWindow: Update controls when attachment changes
2025-02-02 18:02:58 +01:00
Admiral H. Curtiss
9ff833e2f4
Merge pull request #13315 from jordan-woyak/func-exp-cleanup
InputCommon/ExpressionParser: Function argument parsing minor cleanup.
2025-02-02 17:23:13 +01:00
Admiral H. Curtiss
04775b6ef8
Merge pull request #13314 from jordan-woyak/input-expressions-assignment-op-fix
InputCommon: Fix input expression assignment operator behavior.
2025-02-02 17:22:25 +01:00
JMC47
8291cff46d
Merge pull request #13280 from jordan-woyak/input-expressions-highlighting
InputCommon/DolphinQt: Fix sometimes broken syntax highlighting in IOWindow.
2025-02-02 02:01:34 -05:00
Jordan Woyak
67b8100cd2 InputCommon/ExpressionParser: Make ValidateArguments access existing
members instead of passing arguments.
2025-01-28 20:15:45 -06:00
Jordan Woyak
e4b464e727 InputCommon/ExpressionParser: Make function argument parsing error
message more clear.
2025-01-28 20:13:06 -06:00
Jordan Woyak
c9ad5430d0 InputCommon: Fix input expression assignment operator behavior. 2025-01-28 14:32:39 -06:00
Admiral H. Curtiss
0b7f9541d0
Merge pull request #13304 from JoshuaVandaele/argsegfault
Fix segfault when passing invalid arguments
2025-01-28 19:27:23 +01:00
JMC47
e18a4d04b4
Merge pull request #13178 from jordan-woyak/input-expressions-conditional-op
InputCommon: Add ternary conditional operator to input expressions.
2025-01-27 21:16:29 -05:00
Joshua Vandaële
f1f147965b
Fix segfault when passing invalid arguments 2025-01-24 20:52:33 +01:00
Jordan Woyak
8354279aae InputCommon: Add support for SDL gamecontroller rumble triggers. 2025-01-21 21:09:39 -06:00
Jordan Woyak
fb512adc5f InputCommon: Make SDL Motor L/R Outputs not fight each other. 2025-01-21 19:19:01 -06:00
Jordan Woyak
78bb30d44c InputCommon/ExpressionParser: Require delimited tokens actually have their terminating delimiter. 2025-01-19 17:20:07 -06:00
Dentomologist
fb3a727fcc WiiTASInputWindow: Update controls when attachment changes
Change the displayed controls in the TAS Input window when the
controller's extension (including MotionPlus) is changed.

This previously required restarting Dolphin after the attachment was
changed, as the controls were never updated after the WiiTASInputWindow
was created at Dolphin startup.
2025-01-18 14:15:20 -08:00
Jordan Woyak
a618854413 ExpressionParser: Remove RemoveInertTokens. 2025-01-17 02:31:33 -06:00
Jordan Woyak
c94ec85460 InputCommon: Make input expression multiline-comment tokenizing less hacky. 2025-01-17 02:29:23 -06:00
Jordan Woyak
bc95c001c8 InputCommon: Move input mapping function into a class for non-blocking usage. 2025-01-01 16:48:32 -06:00
mitaclaw
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
JMC47
532a8621da
Merge pull request #13116 from mitaclaw/ranges-modernization-8-trivial-of
Ranges Algorithms Modernization - Of
2024-12-26 16:51:53 -05:00
JMC47
1ba8541da9
Merge pull request #13091 from mitaclaw/ranges-modernization-2-returns
Ranges Algorithms Modernization - Return
2024-12-20 12:50:19 -05:00
mitaclaw
2b0cd16c8c Modernize std::none_of with ranges
In JitRegCache.cpp, the lambda predicate were replaced by a pointer to member function because ranges algorithms are able to 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.

In BoundingBox.cpp, the lambda predicate was returning the bool element unchanged, so `std::identity` was a better fit.
2024-12-15 19:54:17 -08:00
mitaclaw
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
mitaclaw
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
Jordan Woyak
ad1511982a InputCommon/SDL: Add touchpad inputs. 2024-12-04 21:08:18 -06:00
JMC47
8c3b9c9cf6
Merge pull request #13174 from jordan-woyak/sdl-battery
ControllerInterface/SDL: Add Battery Input.
2024-12-04 21:46:07 -05:00
JosJuice
74ed5e5532 Android/GCAdapter: Don't join current thread
The read thread could call Reset, which in turn tried to join the read
thread, leading to a SIGABRT. This manifested as Dolphin consistently
crashing when disconnecting a GC adapter and having a chance of crashing
a few seconds after connecting a GC adapter.
2024-12-01 12:59:25 +01:00
JosJuice
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
Jordan Woyak
5078a63084 InputCommon: Add ternary conditional operator to input expressions. 2024-11-07 08:31:25 -06:00
Jordan Woyak
83ed817ad2 ControllerInterface/SDL: Add Battery Input. 2024-11-04 22:24:42 -06:00
Jordan Woyak
346a9e0f97 InputCommon: Move FullAnalogSurface class definition out of header file. 2024-11-03 15:06:50 -06:00
Jordan Woyak
2f1390e9f9 InputCommon: Rename AddAnalogInputs to AddFullAnalogSurfaceInputs. 2024-11-03 15:06:50 -06:00
dreamsyntax
2f38a00534 InputCommon: Disable DualSense Player LED 2024-11-02 16:49:36 -07:00
Jordan Woyak
d361d4ba6e ControllerInterface/SDL: Fix device removal event processing. 2024-10-31 14:11:27 -05:00
Jordan Woyak
19c3b88e5a ControllerInterface/SDL: Disable SDL's Windows.Gaming.Input controller handling. 2024-10-30 17:41:09 -05:00
JMC47
96c9591b99
Merge pull request #13096 from mitaclaw/ranges-modernization-7-rewrite
Ranges Algorithms Modernization - Rewrite
2024-10-27 19:17:01 -04:00
mitaclaw
5f3a8ff0de Modernize std::unique with ranges
The new return value is `std::ranges::subrange`.
2024-10-17 18:39:12 -07:00
JosJuice
07605bf67c
Merge pull request #13090 from mitaclaw/ranges-modernization-1-trivial
Ranges Algorithms Modernization - Trivial
2024-10-15 17:08:55 +02:00
Jordan Woyak
ccdce615ec ControllerEmu: Change trigger threshold check to >= instead of > and set minimum threshold in UI to 1% to prevent user error. 2024-10-11 19:38:38 -05:00
mitaclaw
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
mitaclaw
88a1a5b4f2 Modernize std::set_intersection with ranges 2024-10-10 00:53:48 -07:00
mitaclaw
ebf7cebc32 Modernize std::sort with ranges 2024-10-10 00:53:48 -07:00
mitaclaw
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
mitaclaw
249defa72b Modernize std::equal with ranges 2024-10-10 00:53:48 -07:00
mitaclaw
4cc5e1972a Modernize std::count_if with ranges 2024-10-10 00:53:48 -07:00
mitaclaw
e6f93efac4 Simplify std::transform with std::ranges::transform_view 2024-10-09 17:26:10 -07:00
mitaclaw
809766a439 Simplify std::fill with std::array::fill 2024-10-09 17:26:10 -07:00
mitaclaw
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
Dr. Dystopia
9602f36248 Remove redundant semicolons 2024-08-20 14:59:54 +02:00
mitaclaw
de1c47a701 Misc. Container Find Changes 2024-08-15 14:25:51 -07:00
mitaclaw
9fa4eb9aab Use 'contains' method 2024-08-15 14:20:16 -07:00