Commit Graph

1440 Commits

Author SHA1 Message Date
Joshua Vandaële e89107cbcd
CheckAndAddWarning: Enforce explicitely marked warnings as errors
I replaced the previous usage of `check_and_add_flag` with a new `check_and_add_warning` function. Certain warnings are also now errors by default. Those are mainly warnings that show and sneak up commonly but are quick to fix.
2025-05-23 01:05:38 +02:00
Jordan Woyak 5a80105555 Common and VideoCommon: Change texture data from std::vector to Common::UniqueBuffer. 2025-05-03 18:32:30 -05:00
Dentomologist 77744169be SDL: Check if touchpad exists before getting input
Verify a touchpad is present before polling it for input. Without this
check the Debug log is spammed with the message "error: Parameter
'touchpad' is invalid" if you have a controller without a touchpad.

One would think every touchpad supports at least 1 finger, but in case
there's some weird edge case check the finger count to be sure.
2025-05-02 17:21:42 -07:00
OatmealDome 0b0151770a
Merge pull request #13436 from JoshuaVandaele/clang-format-19
Update clang-format to version 19
2025-04-30 01:17:31 -04:00
Tilka fe307a06c6
Merge pull request #13476 from jordan-woyak/sdl-header
InputCommon: Move SDL Device class into its own cpp/h files.
2025-04-25 01:49:52 +01:00
Joshua Vandaële 2c54ee94c1
linter: Apply clang-format 19.1 formatting
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
2025-04-23 11:19:20 +02:00
Jordan Woyak 87beb7d67b InputCommon: Activate IMU Accelerometer and Gyroscope when any direction has a bound input. 2025-04-10 15:55:49 -05:00
Jordan Woyak 17c994df2a InputCommon: Move SDL Device class into its own cpp/h files. 2025-03-30 23:23:06 -05:00
JMC47 7d794897c4
Merge pull request #13434 from JosJuice/android-non-blocking-input-detection
Android: Don't use separate thread for MotionAlertDialog
2025-03-28 18:25:04 -04:00
JosJuice 516c1314d2 Android: Don't use separate thread for MotionAlertDialog
This is an Android continuation of bc95c00. We now call
InputDetector::Update immediately after receiving an input event from
Android instead of periodically calling it in a sleep loop. This
improves detection of very short inputs, which are especially likely to
occur for volume buttons on phones (or at least on my phone) if you
don't intentionally keep them held down.
2025-03-23 21:39:04 +01:00
JMC47 ad3650abfc
Merge pull request #13093 from mitaclaw/ranges-modernization-4-projection
Ranges Algorithms Modernization - Projection
2025-03-23 15:56:13 -04:00
JMC47 2da255d8cd
Merge pull request #13311 from iwubcode/dynamic_input_textures_reduce_image_writes
Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures
2025-03-23 15:12:28 -04:00
iwubcode d03f9032c1 Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures 2025-03-22 14:53:02 -05:00
Jordan Woyak ddb82a5e8c InputCommon/ControllerEmu: Break out functionality of EmulatedController
to eliminate redundant unused members in Wii Remote extension objects.
2025-03-15 14:30:43 -05:00
JMC47 189d09011b
Merge pull request #13363 from JoshuaVandaele/nowarnings
Fix multiple minor warnings
2025-03-10 15:04:14 -04:00
JMC47 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
mitaclaw c9f589faa5 Modernize `std::stable_sort` with ranges and projections 2025-03-09 13:26:38 -07:00
Jordan Woyak e217d6c939 InputCommon: Use Clock from CommonTypes. 2025-03-02 15:42:26 -06:00
Joshua Vandaële 0a83783fae
Migrate to SFML>=3.0.0 2025-02-25 06:42:13 +01:00
Joshua Vandaële 5b4d4ca5eb
Fix multiple minor warnings
- ExpressionParser.cpp: `-Wmissing-declarations`
- AchievementManager.cpp: `-Wsign-compare`
- SI.cpp: `-Warray-bounds=`
- NetPlayClient.cpp: `-Wdangling-reference`
2025-02-21 19:17:29 +01:00
JMC47 a8fae9b826
Merge pull request #13320 from jordan-woyak/detect-alternations
DolphinQt/Mapping: Add setting to enable waiting for alternate mappings.
2025-02-15 12:59:23 -05:00
OatmealDome c770e7c276
Merge pull request #13318 from sanjay900/dont-detach-macos
LibusbDevice: Don't detach kernel drivers on macOS
2025-02-08 01:01:58 -05:00
Jordan Woyak cdabd651aa InputCommon/ExpressionParser: Add compound assignment operators. 2025-02-02 14:37:11 -06:00
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 6e7e808b66 DolphinQt/Mapping: Add setting to enable waiting for alternate mappings
using the OR-operator.
2025-02-01 01:54:10 -06:00
Sanjay Govind 10e044872d LibusbDevice: Don't detach kernel drivers on macOS 2025-02-01 10:32:20 +13: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