Commit Graph

32402 Commits

Author SHA1 Message Date
xperia64 bbc11edd7d Rework WriteD3 based on hardware testing 2025-04-25 00:51:45 +01:00
Tillmann Karras 4d9dc1e1cd GekkoDisassembler: standardize SPR names and add missing ones 2025-04-25 00:24:12 +01:00
Dr. Dystopia ef8b9a0dcd Core/HW/SI: Make variables constant 2025-04-24 17:01:12 +02:00
JMC47 8fa725d5e4
Merge pull request #13573 from tygyh/DolphinTool-Make-parameter-constant
DolphinTool: Make parameter constant
2025-04-24 00:49:10 -04:00
JMC47 fc0aafca3b
Merge pull request #13577 from tygyh/UCodes-Make-functions-static
UCodes: Make functions static
2025-04-24 00:48:46 -04:00
JMC47 f675048768
Merge pull request #13578 from tygyh/Core/HW-Remove-redundant-empty-lambda-parameter-lists
Core/HW: Remove redundant empty lambda parameter lists
2025-04-24 00:48:28 -04:00
Jordan Woyak 1cea31c75a
Merge pull request #13580 from LillyJadeKatrin/retroachievements-de-bug-debug
Fix debugger disabled bug
2025-04-23 23:28:19 -05:00
Jordan Woyak 3025cd472c
Merge pull request #13491 from JosJuice/oh0-removed-opened
IOS: Remove from m_opened_devices in OH0::OnDeviceChange
2025-04-23 23:25:34 -05:00
LillyJadeKatrin 022bc3bf8d Fix debugger disabled bug
Fixing an oversight: this was causing the debugger to be disabled if achievements were disabled but hardcore mode was still enabled in the .ini. This fix properly checks for hardcore state via AchievementManager which takes both settings into account.
2025-04-23 22:57:35 -04:00
Sanjay Govind 8bb07bf3c4 LibusbDevice: Send wakeup command to Santroller devices 2025-04-24 12:09:41 +12:00
Admiral H. Curtiss 879a8889aa
Merge pull request #13431 from jordan-woyak/spsc-waiting
Common: SPSCQueue cleanups and improvements.
2025-04-23 22:19:15 +02:00
Dr. Dystopia 564e7c3320 UCodes: Make functions `static` 2025-04-23 21:36:13 +02:00
Dr. Dystopia 467a568f60 Core/HW: Remove redundant empty lambda parameter lists 2025-04-23 21:32:09 +02:00
Dr. Dystopia 03a6fdcd85 DolphinTool: Make variables constant 2025-04-23 20:24:50 +02:00
JosJuice bda1f379b7 IOS: Remove from m_opened_devices in OH0::OnDeviceChange
I've been playing Rock Band 3 recently and have experienced a bug where
sometimes if you disconnect and reconnect a USB microphone, the game
won't pick up on it connecting, not even it you disconnect and reconnect
it again. An investigation into what's going on inside Dolphin shows
that when the game triggers a call to OH0::DeviceOpen after the device
has been reinserted, Dolphin doesn't open the device because it's
already present in m_opened_devices.

Removing the device from m_opened_devices after calling OH0::TriggerHook
in OH0::OnDeviceChange resolves this specific issue in my testing. Doing
this matches us removing the device from m_opened_devices after calling
OH0::TriggerHook in OH0::DeviceClose, but I haven't looked at exactly
what real IOS does.

I have been able to reproduce a much rarer issue that has the same
symptoms on the surface but where OH0::DeviceOpen gets past its
m_opened_devices check. I'm currently not sure what the cause of this
remaining issue is.
2025-04-23 17:19:14 +02:00
Dr. Dystopia fe657b9759 DolphinTool: Make parameter constant 2025-04-23 15:55:48 +02:00
Martino Fontana e751235574 DolphinQt: Remove unused variables from `AdvancedPane.h`
Small oversight from #13422.
2025-04-23 12:32:12 +02:00
Joshua Vandaële bf554edfe0
linter: Add and apply new formatting rules
New rules:
`InsertNewlineAtEOF: true`
`RemoveSemicolon: true`
`RequiresClausePosition: WithPreceding`
2025-04-23 11:19:57 +02: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
JMC47 8f3483fdd4
Merge pull request #13565 from LillyJadeKatrin/retroachievements-end-of-memory-bug
Fix memory bounds error in achievements dev
2025-04-23 01:01:47 -04:00
Jordan Woyak af960651e8 Common: SPSCQueue cleanups and improvements. 2025-04-22 23:49:32 -05:00
Jordan Woyak 116bd3a031
Merge pull request #13382 from JoshuaVandaele/btadapterchoice
Add a GUI option to select a bluetooth device
2025-04-22 22:05:30 -05:00
LillyJadeKatrin 8b610101bc Fix memory bounds error in achievements dev
This particular out of bounds error was causing every memory read at the far end of memory to return all zeroes.
2025-04-22 22:49:55 -04:00
Tilka c4f65febf3
Merge pull request #13563 from Tilka/rcheevos
Fix building with USE_RETRO_ACHIEVEMENTS=OFF
2025-04-23 03:27:15 +01:00
Tilka 871073eee2
Merge pull request #13564 from jordan-woyak/triforce_ipl-warning
Core/Boot: Fix unused variable warning.
2025-04-23 03:26:48 +01:00
Jordan Woyak 31a3de819d
Merge pull request #13540 from tygyh/DiscIO-Remove-redundant-qualifiers
DiscIO: Remove redundant qualifiers
2025-04-22 20:00:03 -05:00
Jordan Woyak 0fd090ce19
Merge pull request #13550 from Tilka/top_warnings
IOS/Network: fix some warnings
2025-04-22 19:45:47 -05:00
Joshua Vandaële 4773a6f323
Add a GUI option to select a bluetooth device 2025-04-23 02:19:28 +02:00
JMC47 826625c7be
Merge pull request #13422 from jordan-woyak/adv-tooltips
DolphinQt: Use tooltips on Advanced tab.
2025-04-22 19:27:21 -04:00
Jordan Woyak 00544e4dff Core/Boot: Fix unused variable warning. 2025-04-22 18:19:32 -05:00
Tillmann Karras 609165b62b Fix building with USE_RETRO_ACHIEVEMENTS=OFF 2025-04-22 23:45:40 +01:00
Tillmann Karras f6d3f448d9 IOS/Network: fix -Wmissing-braces warnings 2025-04-22 23:36:01 +01:00
Jordan Woyak ac76deaef0
Merge pull request #13529 from jordan-woyak/StateBuffer
Core/State: Avoid unnecessarily value-initializing large buffers.
2025-04-22 16:30:51 -05:00
OatmealDome da84a9f605
Merge pull request #13477 from OatmealDome/macos-11
CMakeLists: Bump minimum macOS to 11.0
2025-04-22 17:27:12 -04:00
Jordan Woyak afee9a56e9
Merge pull request #13474 from JosJuice/rock-band-playstation
IOS: Disguise Rock Band PlayStation USB devices as Wii equivalents
2025-04-22 16:02:16 -05:00
Jordan Woyak 9254a53397
Merge pull request #13490 from JosJuice/one-usb-scanner
IOS: Only have one USB scanning thread
2025-04-22 16:01:18 -05:00
JMC47 fd8ce3ce80
Merge pull request #13555 from jordan-woyak/cubeb-default
AudioCommon: Make cubeb sound backend default on Linux.
2025-04-22 12:07:43 -04:00
JosJuice 12010ebf78
Merge pull request #13557 from LillyJadeKatrin/pause-bugfix
AchievementManager: Always allow pausing if game not loaded
2025-04-22 17:55:23 +02:00
Dr. Dystopia ecafd8058f DiscIO: Remove redundant qualifiers 2025-04-22 13:54:10 +02:00
Jordan Woyak 89873d6238
Merge pull request #13472 from tygyh/Use-values-function
Core/NetPlayServer: Use std::views::values and std::views::keys functions
2025-04-22 02:25:46 -05:00
LillyJadeKatrin d670c21c8e Always allow pausing if game not loaded
RetroAchievements disables pausing too frequently when running but there's no sense of doing this if RetroAchievements does not currently have a game running.
2025-04-21 22:38:09 -04:00
Jordan Woyak 1e8b668793 DVDInterface: Fix crash when playing wiiware. 2025-04-21 18:38:33 -05:00
Jordan Woyak 1fc6be7f80 AudioCommon: Make cubeb sound backend default on Linux. 2025-04-21 16:25:40 -05:00
JosJuice e468e2359a IOS: Only have one USBScanner
Some games open two USB interfaces, e.g. /dev/usb/oh0 and /dev/usb/hid.
This was causing us to run two scanning threads at once, using up more
CPU time for scanning than we need to.
2025-04-21 21:57:49 +02:00
LillyJadeKatrin 8f12512d0d Call AchievementManager CloseGame on load failures
We have identified that a failed RetroAchievements game load (most easily done when closing a game before the server can finish responding) can leave data behind that causes problems. As such, refactored CloseGame to always delete data even if there wasn't a game loaded when it was called, and call it on the failure paths of LoadGameCallback.
2025-04-21 15:53:31 -04:00
JosJuice 920a44aec2 IOS: Diff device lists in USBHost instead of USBScanner
Instead of having USBScanner create "hooks" as it scans for devices,
let's have USBScanner present a list of devices to USBHost and have
USBHost diff the new device list with its old device list to create the
hook calls instead. This gets rid of some complex edge cases that the
next commit otherwise would have to deal with, in particular regarding
toggling determinism and adding new USBHosts to a USBScanner.
2025-04-21 21:25:36 +02:00
JosJuice 24fdcc1a0e IOS: Add missing locking for USBHost::m_devices
Note: After adding the missing locking of m_devices_mutex, I had to move
the locking of m_hooks_mutex to avoid a random deadlock between the CPU
thread and USB scanning thread. (Either that or I would have to lock
m_devices_mutex before m_hooks_mutex.)
2025-04-21 21:25:35 +02:00
JosJuice 50a8ae9d90 IOS: Keep copy of m_devices in USBHost
This gets rid of the ugly direct access to USBScanner::m_devices that
was introduced by the previous commit.

This also fixes a potential thread safety issue.
USB_HIDv4::TriggerDeviceChangeReply loops through m_devices and calls
GetDeviceEntry for each device. If USB_HIDv4::TriggerDeviceChangeReply
is called after a new device is added to m_devices but before hooks are
dispatched, GetDeviceEntry crashes, because the hook that's supposed to
update m_device_ids hasn't run yet. With this commit, this issue can no
longer happen, because USBHost::m_devices_mutex doesn't get unlocked in
between updating m_devices and dispatching the hooks.
2025-04-21 21:25:35 +02:00
JosJuice 427e9c5ad2 IOS: Move USB scanning thread to new class USBScanner 2025-04-21 21:25:35 +02:00
JosJuice c0c180bdc2
Merge pull request #13467 from JosJuice/profiler-thread-safety
Common: Make Profiler thread safe
2025-04-21 20:19:47 +02:00
JMC47 258fc1b209
Merge pull request #12949 from LillyJadeKatrin/retroachievements-new-dev-branch
RetroAchievements - Dev Branch Refactor
2025-04-21 14:08:40 -04:00
Dr. Dystopia 35fa32e254 Core/PowerPC/JitArm64: Replace zeroes in boolean context with `false` 2025-04-21 17:06:06 +02:00
Zopolis4 89fdc0b9e0
Fix Triforce GameINIs 2025-04-21 22:05:26 +10:00
Zopolis4 2238967d93
Add Triforce IPL hash 2025-04-21 22:05:25 +10:00
Zopolis4 660232a12c
Preliminary implementation of the Triforce Baseboard 2025-04-21 22:05:25 +10:00
Zopolis4 2baa09d5b4
Implement endian swapping and lazy decryption of Triforce DI commands 2025-04-21 22:05:25 +10:00
Zopolis4 8d94d25203
Implement Triforce ID parsing 2025-04-21 22:05:25 +10:00
Zopolis4 71f654cdc4
Add Triforce platform and preliminary boot.id parsing 2025-04-21 22:05:25 +10:00
Zopolis4 494e2c05c2
Adding support for detecting .bin images 2025-04-21 22:05:24 +10:00
OatmealDome ec9fb08dab MTLUtil: Remove availability check for iOS 13
My personal fork requires minimum iOS 14, so this is not required.
2025-04-21 00:24:58 -04:00
OatmealDome 65f42ee2d2 MTLUtil: Always use MSL 2.3
The minimum macOS (and minimum iOS on my personal fork) are enough to allow MSL 2.3 usage without availability checks.
2025-04-21 00:24:58 -04:00
OatmealDome 53b66be47d MTLUtil: Remove availability checks for macOS 10.15 and iOS 13 2025-04-21 00:24:58 -04:00
OatmealDome 0bc33fb6df MTLUtil: Remove availability check for macOS 10.15 2025-04-21 00:24:58 -04:00
OatmealDome dc8865718e MTLUtil: Remove availability check for macOS 11 2025-04-21 00:24:58 -04:00
OatmealDome 7213cdd439 MemoryUtil: Remove availability checks for macOS 11 2025-04-21 00:24:58 -04:00
Jordan Woyak a517c9f862 CoreTiming: Move VISkip calculation into a separate function. 2025-04-20 22:01:06 -05:00
Jordan Woyak 7236d1539a CoreTiming: Cleanups to avoid drift from cumulative rounding errors. 2025-04-20 22:01:01 -05:00
OatmealDome bc3c3eb79a
Merge pull request #13524 from jordan-woyak/fix-gba-link
SI: Fix GBA link by having a separate response for "error" and "no data".
2025-04-20 22:29:38 -04:00
Tilka 7e7b75c1e6
Merge pull request #13537 from tygyh/DiscIO-Make-variables-constexpr
DiscIO: Make variables constexpr
2025-04-21 00:52:18 +01:00
Tilka 9504916f72
Merge pull request #13538 from tygyh/DiscIO-Use-default-to-define-a-trivial-destructor
DiscIO: Use `= default` to define a trivial destructor
2025-04-20 22:32:12 +01:00
Tilka 0a52140145
Merge pull request #13549 from shuffle2/ucrtpatch
remove ucrt compat patches
2025-04-20 22:24:57 +01:00
Tilka 45ed4b2be9
Merge pull request #13541 from tygyh/DiscIO-Remove-redundant-zero-initializers-in-aggregate-initializations
DiscIO: Remove redundant zero initializers in aggregate initializations
2025-04-20 22:07:58 +01:00
Tilka 2adf3449f3
Merge pull request #13548 from shuffle2/http
HttpRequest: remove some legacy code for windows < 8.1
2025-04-20 22:07:32 +01:00
Jordan Woyak 8d7d026da6
Merge pull request #13533 from tygyh/DiscIO-Make-classes-final
DiscIO: Make classes final
2025-04-20 16:06:07 -05:00
Shawn Hoffman 2d1161150b remove ucrt compat patches
Dolphin has not supported a version of windows where
these binaries exist for a while.
2025-04-20 12:50:10 -07:00
Shawn Hoffman 5dd896a7d9 HttpRequest: remove some legacy code for windows < 8.1 2025-04-20 11:46:09 -07:00
Dr. Dystopia 07ad189b4f DiscIO: Pass parameters by constant reference 2025-04-20 08:26:09 +02:00
Jordan Woyak ac3dbe2294 Core/State: Use UniqueBuffer instead of make_unique and std::vector for save state buffers. 2025-04-19 17:29:56 -05:00
Jordan Woyak 12dcd6c285 Common: Add UniqueBuffer and SharedBuffer templates. 2025-04-19 17:13:40 -05:00
Jordan Woyak f78fa2e9f1 LinearDiskCache: Use make_unique_for_overwrite. 2025-04-19 17:13:40 -05:00
Dr. Dystopia 77b4270981 DiscIO: Remove redundant zero initializers in aggregate initializations 2025-04-19 22:04:50 +02:00
Dr. Dystopia 7123fcd19b DiscIO: Use `= default` to define a trivial destructor 2025-04-19 17:43:18 +02:00
Dr. Dystopia f6ba69f99a DiscIO: Make variables constexpr 2025-04-19 17:17:02 +02:00
JosJuice 1ae0b23265
Merge pull request #13528 from jordan-woyak/win-cmake-fix
Common/Timer: Change HANDLE to void* to avoid including Windows.h to fix cmake build.
2025-04-19 16:41:51 +02:00
JosJuice 49ebdaaae3
Merge pull request #13507 from JosJuice/time-played-game-id
Core: Don't store game ID inside TimePlayed
2025-04-19 14:28:02 +02:00
Jordan Woyak fda8afaf5c SI: Fix GBA link by having a separate response for "error" and "no data". 2025-04-19 03:28:57 -05:00
Dr. Dystopia 301cc5ee63 DiscIO: Make classes final 2025-04-19 09:05:22 +02:00
Jordan Woyak cb20959679 Common/Timer: Change HANDLE to void* to avoid including Windows.h to fix cmake build. 2025-04-18 21:50:15 -05:00
Jordan Woyak 056b0339be
Merge pull request #13496 from TryTwo/PR_GameSettings_Fix
Game config settings: Show global value when no game setting exists.
2025-04-18 15:56:59 -05:00
LillyJadeKatrin c55624702c Allow RA Dev Tools for Unidentified Games
Due to requests from RA Devs, updating the AchievementManager LoadGameCallback to still set MemoryPeeker (and set m_system) if the load game response is NO_GAME_LOADED, so that the memory inspector et al continue function properly on unidentified hashes. Without this, no memory is loaded and the memory inspector will show all zeroes.
2025-04-16 23:59:16 -04:00
LillyJadeKatrin a96c935c1c Added modified achievements confirmation
Added a line to the close game confirmation dialog to tell the dev if there are unsaved modifications to the achievement assets.
2025-04-16 17:01:22 -04:00
LillyJadeKatrin b9a93794ff Added game title estimate for achievement development
If the development system is started for a game with an unrecognized hash, RA_Integration opens a dialog for connecting the hash with a title. That dialog is prepopulated by the results of GameTitleEstimateHandler.
2025-04-16 17:01:22 -04:00
LillyJadeKatrin ef612912a2 Handle local achievements
Displays an additional message when an achievement unlocks that isn't on the site yet (either hasn't yet been uploaded or modified from remote) i.e. achievements the "player" is actively developing.
2025-04-16 17:01:21 -04:00
LillyJadeKatrin fa782de15c Add MemoryPoker for RAIntegration 2025-04-16 17:00:58 -04:00
Jordan Woyak f8bf35e6f0
Merge pull request #13518 from tygyh/Fix-Partition-struct-comparison-operators
DiscIO/Volume: Fix Partition struct comparison operators
2025-04-16 00:20:28 -05:00
Jordan Woyak 8bfde300f4
Merge pull request #13519 from tygyh/Replace-definitions-with-constant-expressions
Replace definitions with constant expressions - Core/HW/EXI/BBA/TAP_Win32
2025-04-16 00:19:40 -05:00
OatmealDome 2af276d27e MemArenaDarwin: Initialize all address variables passed to vm_map 2025-04-16 00:50:54 -04:00
Dr. Dystopia c4f906bcd9 Replace definitions with constant expressions - Core/HW/EXI/BBA/TAP_Win32 2025-04-15 12:26:16 +02:00
Dr. Dystopia 3bb925c1c7 DiscIO/Volume: Fix Partition struct comparison operators 2025-04-15 12:18:23 +02:00
Dr. Dystopia 2397a3a915 Use range-based loops - Core VideoBackends 2025-04-14 21:49:08 +02:00
LillyJadeKatrin 90a4be4b36 Add RAIntegration event handler
Some refactoring done to hardcore toggling so that it's more readily available for the toggle hardcore event.
2025-04-13 13:36:15 -04:00
LillyJadeKatrin 9caa02493d Add RetroAchievements development menu
When the menu exists, it replaces the Achievements action in the Tools menu.
2025-04-13 08:06:00 -04:00
LillyJadeKatrin 36c7e7f3c7 Load RA_Integration.DLL at init if present 2025-04-13 08:05:59 -04:00
LillyJadeKatrin cab5bc5680 Update rcheevos submodule to newest master 2025-04-13 08:05:59 -04:00
LillyJadeKatrin 6ad267017c Refactor AchievementBox to const pointer
Not sure when or why this became necessary but it works.
2025-04-13 08:05:59 -04:00
Dentomologist 2c20d5dcd9 GameList: Ignore non-left double-clicks
Don't start a game when a double-click is triggered by a mouse button
other than the left button.

Fixes https://bugs.dolphin-emu.org/issues/12272.
2025-04-12 16:17:04 -07:00
JosJuice 4f210df86a
Merge pull request #13489 from AdmiralCurtiss/translate-audio-backend
DolphinQt/AudioPane: Fix Audio backend dropdown not using translated names
2025-04-12 17:59:42 +02:00
JMC47 bcddd78a89
Merge pull request #13500 from jordan-woyak/accel-gyro-any-mapping
InputCommon: Activate IMU Accelerometer and Gyroscope mappings when any direction has a bound input.
2025-04-12 11:47:38 -04:00
JosJuice d194e69bbd Core: Don't store game ID inside TimePlayed
When you use TimePlayed, you have to provide a game ID either when
creating the object or when calling GetTimePlayed on it. If you don't
provide a game ID when creating the object, function calls that don't
take a game ID will silently fail, except for Reload. This isn't very
obvious, and there's no strong benefit to storing the game ID inside
TimePlayed anyway (it just lets TimePlayed skip calling EscapeFileName),
so this commit removes the TimePlayed constructor that takes a game ID
and instead makes the functions that need game IDs always take a game ID
argument.
2025-04-12 15:20:49 +02:00
JMC47 5285b1168a
Merge pull request #13503 from sepalani/ip-top-perf
IP/Top: Fix performance regression in GetInterfaceOpt
2025-04-11 18:56:35 -04:00
Sepalani 03451f2bc9 IP/Top: Fix performance regression in GetInterfaceOpt 2025-04-12 01:38:00 +04: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
JMC47 fc0179c1ea
Merge pull request #13498 from jordan-woyak/immxfb-dualcore-todo
BPStructs: Add TODO for unsafe usage of GetTicks.
2025-04-09 23:20:35 -04:00
Jordan Woyak 4aa056dd4d BPStructs: Add TODO for unsafe usage of GetTicks. 2025-04-08 19:58:31 -05:00
Javier Martinez 7ca8dc3767 Use std path utility for automatic path seperator handling.
It was being done manually, which a TODO comment advised against.
Using generic_string() from std::filesystem::path solves this.

Fix encoding issue using generic_wstring instead.
2025-04-08 16:54:11 -04:00
JMC47 01363572cb
Merge pull request #13483 from Sam-Belliveau/fixed_playback_speed
Use Doubles for Sample Rate Conversion
2025-04-08 13:45:12 -04:00
TryTwo 91380258a1 GameConfig Settings: If no game setting exists for a certain option, then show the global setting value. Previously showed the default value if the game setting didn't exist. 2025-04-07 20:41:46 -07:00
JMC47 ee27f03a43
Merge pull request #13439 from jordan-woyak/perf-marker
Core: Move CountPerformanceMarker to VideoInterface to eliminate a Throttle call. PerformanceMetrics: Fixes/Cleanups.
2025-04-07 17:57:56 -04:00
Admiral H. Curtiss b306d00d5d
DolphinQt/AudioPane: Fix Audio backend dropdown not using translated names 2025-04-06 05:09:23 +02:00
Dentomologist ec49ea5be3 PerformanceMetrics: Fix window arrangement
Fix overlays stacking on top of each other or not moving to the edge of
the screen when enabling or disabling overlays while emulation is
active.

This change only applies when Config::GFX_MOVABLE_PERFORMANCE_METRICS is
False.
2025-04-05 14:22:17 -07:00
Sam Belliveau 74e752ed9c Mixer: Use Doubles for Sample Rate Conversion. 2025-04-05 13:46:37 -05:00
Jordan Woyak 06afa0036a CoreTiming: Fix Precision Frame Timing in Dual Core mode on Windows. 2025-04-04 19:13:53 -05:00
Jordan Woyak e0e53f3235 Common/Timer: Use YieldProcessor on Windows. 2025-04-03 15:48:51 -05:00
Jordan Woyak 7dc27753e2 CoreTiming: Add a setting to use Common::PrecisionTimer. 2025-04-03 15:48:51 -05:00
Jordan Woyak e5c8935acc Common: Create a PrecisionTimer class. 2025-04-03 15:48:51 -05:00
Admiral H. Curtiss dadbd2f9fb
Merge pull request #13479 from iwubcode/mali_draw_fix
VideoCommon: fix a mali draw bug that causes crashes in some games
2025-04-03 21:55:41 +02:00
Jordan Woyak af1f07207f VideoInterface: Throttle for VBlank only when necessary. 2025-04-02 23:24:03 -05:00
Jordan Woyak c42dab6388 Core: Move CountPerformanceMarker to VideoInterface to eliminate a Throttle call. PerformanceMetrics: Fixes/Cleanups. 2025-04-02 23:23:51 -05:00
JMC47 61ab662733
Merge pull request #13424 from Sam-Belliveau/granule-performance-improvements
AudioCommon: Increased Granule Synthesis Performance
2025-04-02 22:44:14 -04:00
Dr. Dystopia ebc9c8492d Use std::views::values and std::views::keys functions - NetPlayServer 2025-04-02 20:06:10 +02:00
iwubcode ec36fce7c6 VideoCommon: fix a mali bug by moving the perf queries back to being close to the draw call, having them apart seems to cause errors on some devices 2025-04-01 18:32:42 -05:00
Sam Belliveau 877864c23a Improve Performance of Granular Buffering + User Adjustable Buffer Size 2025-04-01 18:17:21 -04:00
Jordan Woyak 33a7283d3b VideoBackends/Metal: Fix anisotropic filtering handling. 2025-04-01 15:09:21 -05:00
JosJuice 01a7732d50 IOS: Disguise Rock Band PlayStation USB devices as Wii equivalents
This lets you use PS3 Rock Band controllers with Wii Rock Band and
Guitar Hero games.

A normal user will probably never have any reason to disable this
behavior, but I figured maybe there's some person out there who would
like to disable it. (For instance, I know there's a mod for RB3 that's
trying to implement the same kind of cross-console controller
compatibility, and that can only be tested if the behavior I'm adding is
disabled.) So the behavior is controlled by an INI-only setting.
2025-03-31 21:24:25 +02:00
Jordan Woyak 17c994df2a InputCommon: Move SDL Device class into its own cpp/h files. 2025-03-30 23:23:06 -05:00
Jordan Woyak 4533605c03 DolphinQt: Update tooltips for ImmediateXFB, VBISkip, SkipPresentingDuplicateFrames interaction clarity. 2025-03-30 20:55:26 -05:00
Jordan Woyak 920f940ad0 DolphinQt: Don't toggle GFX_HACK_SKIP_DUPLICATE_XFBS when GFX_HACK_IMMEDIATE_XFB or GFX_HACK_VI_SKIP are enabled. 2025-03-30 20:51:20 -05:00
Admiral H. Curtiss 1b85da9b85
Merge pull request #13471 from Nitch2024/CTRL+G
[Debugger] CTRL+G support in code and memory view
2025-03-30 15:39:54 +02:00
Nitch2024 1b87ea83e6 [Debugger] CTRL+G support in code and memory view 2025-03-29 12:43:15 -07:00
JosJuice 957265ba52 Common: Make Profiler thread safe 2025-03-29 15:05:02 +01:00
JMC47 9819d66a47
Merge pull request #13221 from mitaclaw/nrvo-fails-1
GCC: Remedy NRVO Fails
2025-03-29 03:26:46 -04:00
JMC47 f00b7d39f0
Merge pull request #13465 from TryTwo/PR_Bugfix
AudioPanel Bugfix
2025-03-28 19:56:36 -04:00
TryTwo efd993f382 AudioPanel bugfix: Forgot to wrap an optional slider in a conditional. 2025-03-28 15:50:24 -07:00
JMC47 4c727a84c5
Merge pull request #13456 from jordan-woyak/mapping-window-blank-square-fix
DolphinQt: Fix blank square in MappingWindow's top-left corner.
2025-03-28 18:44:32 -04:00
JMC47 932b4abdcf
Merge pull request #13457 from jordan-woyak/efb-access-fix
VideoCommon: Fix out-of-bounds and disabled EFB access.
2025-03-28 18:43:57 -04: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
JMC47 e0032b3e2c
Merge pull request #13122 from TryTwo/PR_Audio_Configs
AudioPanel: Refactor to use Config system.
2025-03-28 14:52:54 -04:00
Joshua Vandaële 3a1a60d4f8
Fix shadowed variable warnings and missing declarations
- PPCSymbolDB:  Resolve shadowed variable warnings
- PerformanceMetrics:  Resolve shadowed variable warnings
- SWEfbInterface: Add missing declarations
2025-03-27 21:48:08 +01:00
Tilka 662cfa38c2
Merge pull request #13460 from jordan-woyak/play-time-tracker-thread-name
Core: Name the play time tracker thread.
2025-03-27 17:02:36 +00:00
JMC47 cb24821dcc
Merge pull request #13217 from cristian64/extract_gecko_creator_name
DolphinQt: Extract creator name from code name in Gecko codes.
2025-03-27 12:26:47 -04:00
Jordan Woyak ebd879cb30 Core: Name the play time tracker thread. 2025-03-27 01:38:55 -05:00
TryTwo e5608c6ca5 ConfigControl fix: Add invalid index check to ConfigComplexChoice. Resolve with a default index that can be set.
If more control is needed,  it could be changed to allow multiple states to point to the same index.
2025-03-26 13:15:57 -07:00
TryTwo 896b4bb1fa AudioPanel: Refactor to use Config system. Some options were changed to a different format, for easier compatibility.
Removed VolumeChanged signal, as ConfigChanged will trigger what is needed.

Only applies UpdateSoundStream to things that can change during emulation.

Settings::SetVolume might no longer be used, but left it in.
2025-03-26 12:26:01 -07:00
tygyh 1ecd6fbc9b Move variables to inner scope 2025-03-26 18:21:46 +01:00
Jordan Woyak e351f03cdf VideoCommon: Fix out-of-bounds and disabled EFB access. 2025-03-26 01:23:16 -05:00
Jordan Woyak 849d8b7dae DolphinQt: Fix blank square in MappingWindow's top-left corner. 2025-03-25 20:52:29 -05:00
JMC47 1981f22228
Merge pull request #13433 from iwubcode/update_min_win10
Update our minimum windows 10 version to 1903 and reinstate code that depends on it
2025-03-25 18:30:15 -04:00
Dr. Dystopia d2cc6760a0 Use Common::ToUnderlying 2025-03-25 21:25:46 +01:00
JMC47 eb84b0fb9b
Merge pull request #13442 from TryTwo/PR_CodeWidget_Layout_Tweak
Debugger CodeWidget: Small layout tweak
2025-03-25 13:19:02 -04:00
vyuuui e34907025d Add numeric label support to assembler 2025-03-24 18:59:32 -07:00
cristian64 6d8ba94e4c DolphinQt: Extract creator name from code name in Gecko codes.
Gecko codes in Dolphin feature a dedicated field for the creator of the
cheat code. When saved into the INI file, the code name and the creator
name are concatenated, and then inserted in the `[Gecko]` section:

```ini
[Gecko]
$<cheat code name> [<creator>]
<code line 1>
<code line 2>
<code line 3>
<...>
$<other cheat code name> [<creator>]
<code line 1>
<code line 2>
<code line 3>
<...>
```

On the other hand, enabled codes are listed under the `[Gecko_Enabled]`
section, but in this case the creator name is omitted from the line:

```ini
[Gecko_Enabled]
$<cheat code name>
$<other cheat code name>
```

Having the creator name in the `[Gecko]` section but not in the
`[Gecko_Enabled]` section is arguably not ideal, but this is legacy
behavior in Dolphin.

The **Cheat Code Editor** dialog is not acknowledging this subtle
behavior in Dolphin: the cheat code name and the creator name *can* be
both inserted in the name field. This issue manifests as an inconsistent
state where a Gecko code that *appears* to be enabled has no effect when
the game is launched.

As part of this fix, the creator name (if present) is now moved into the
dedicated creator field before the code is stored internally.

Test plan:

- Right-click on any game and open the **Properties** dialog.
- Switch to the **Gecko Codes** tab.
- Press the **Add New Code...** button.
- In the **Cheat Code Editor** dialog:
  - Enter `This is a test [Jane Doe]` in the **Name:** field.
  - Enter `01234567 00000000` in the **Code:** field.
  - Press **Save**.
- Observe that the newly added code is now in the list, and *appears* to
  be enabled.
- Close the **Properties** dialog.
- Right-click on the same game and open the **Properties** dialog again.

**Without** the fix, the newly added code, while still on the list, has
been inadvertently disabled (it was never really enabled!).

**With** the fix, the newly added code is the list and remains enabled.

This fixes https://bugs.dolphin-emu.org/issues/13695.
2025-03-23 21:37:23 +00:00
Dentomologist 0b128badae DolphinQt: Fix unresponsive hotkeys during framestep overlay move
Fix the following bug:

* Have a moveable ImGui overlay enabled, such as the Statistics window.
* Pause the game.
* Click and hold on the overlay's title bar as if you were going to move
  it. Because the screen isn't updating while the game is paused, you
  won't be able to actually move the overlay.
* Press the Frame Advance hotkey several times until it stops
  responding.

At this point emulation hotkeys are no longer responsive. This can be
resolved by selecting Play from the toolbar or menu, or selecting Frame
Advance from the menu a couple times, but it's annoying and not obvious
what's gone wrong or how to fix it.

Why the bug is happening:

* Doing a framestep while clicking on the overlay title bar causes ImGui
  to set IO.WantCaptureKeyboard to true, indicating that ImGui is
  requesting Dolphin ignore any keyboard events while the overlay is
  being interacted with.
* Dolphin complies with this request, causing
  Host_UIBlocksControllerState to return true and thus setting the input
  gate to ignore input.
* IO.WantCaptureKeyboard is only updated when ImGui::NewFrame() is
  called, which only happens at the end of each present. It thus remains
  true indefinitely since the game paused after the last framestep, and
  so Dolphin ignores any hotkeys such as the framestep or play keys.

The fix:

Ignore IO.WantCaptureKeyboard when the game is paused. ImGui can't
meaningfully capture input anyway when the game is paused, so this
shouldn't cause any problems elsewhere.

Once async presentation is implemented we'll want to revert this change,
both because it'll become unnecessary and because ImGui will be able to
do stuff while paused and so suppressing emulation hotkeys will actually
be useful.
2025-03-23 14:36:58 -07: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 1515cf6ccd
Merge pull request #13447 from JosJuice/bba-panic-tr
EXI: Make HLE BBA panic alerts translatable
2025-03-23 15:22:11 -04:00
JMC47 cef4d8fb76
Merge pull request #13432 from iwubcode/custom_pixel_fragment
VideoCommon: move to a 'process_fragment()' function to simplify custom shaders
2025-03-23 15:21:48 -04:00
JMC47 f50d2ee86c
Merge pull request #13425 from jordan-woyak/after-present-cleanup
Fix performance statistics when Skip Duplicate Frames is turned off.
2025-03-23 15:21:31 -04:00
JMC47 28f1beeca8
Merge pull request #13398 from jordan-woyak/perf-tracker
PerformanceTracker: Eliminate mutex. General cleanups.
2025-03-23 15:21:11 -04:00
JMC47 178462e10f
Merge pull request #13385 from Tilka/sp2_ad16
Fix AD16 and make SP2 configurable
2025-03-23 15:20:45 -04:00
JMC47 9b0471532c
Merge pull request #13368 from jordan-woyak/anisotropic-filtering
Use Game Requested Anisotropic Filtering
2025-03-23 15:17:24 -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
JMC47 e93f0de8a4
Merge pull request #13295 from jordan-woyak/controller-emu-cleanup
InputCommon/ControllerEmu: Break out functionality of EmulatedController to eliminate redundant members.
2025-03-23 15:12:06 -04:00
JosJuice c1990bc687 EXI: Make HLE BBA panic alerts translatable
Also rewording the messages to make them clearer and fix typos.
2025-03-23 15:43:16 +01:00
iwubcode 8e253518e6 VideoCommon: move to a 'process_fragment()' function to simplify custom shaders and provide a direct override of the tev stage logic 2025-03-22 15:22:00 -05:00
iwubcode e18d98d4fc Core: properly distinguish between ES title switches (Wii titles) and normal loading (GC, also called for Wii..); update config for ES title change, generate textures for both situations 2025-03-22 14:55:20 -05:00
iwubcode d03f9032c1 Core / DolphinQt / InputCommon: reduce the number disk writes when using DynamicInputTextures 2025-03-22 14:53:02 -05:00
TryTwo b0867c1602 CodeWidget: Layout tweak. Give left-side widgets more vertical space by moving the address bar out of the way. Align things better. 2025-03-21 09:55:52 -07:00
Jordan Woyak 3bf2de369a WiimoteEmu: Eliminate dynamic memory allocation in speaker data decoding. 2025-03-18 03:12:50 -05:00
Jordan Woyak 561aee7707 Config: Expose Default and 1x Anisotropic Filtering setting. 2025-03-17 20:46:24 -05:00
Jordan Woyak 4b711e1e0a DolphinQt: Allow ConfigComplexChoice to handle DefaultState values. 2025-03-17 20:46:24 -05:00
Jordan Woyak ba1bf6959e Config: Allow passing a DefaultState object to Set functions to delete keys. 2025-03-17 20:46:24 -05:00
Jordan Woyak 137d1375d4 Enable game-requested anisotropic filtering in Metal backend. 2025-03-17 20:46:24 -05:00
Pokechu22 79a1e480ca Enable anisotropic filtering when the game requests it 2025-03-17 20:46:19 -05:00
Jordan Woyak a7d1cac8ad Core: Call PerformanceMetrics::CountFrame regardless of PresentReason. 2025-03-17 17:24:08 -05:00
JosJuice 0299540209
Merge pull request #13397 from jordan-woyak/perf-metrics
PerformanceMetrics: Eliminated a mutex. Code cleanups.
2025-03-17 23:20:41 +01:00
Tillmann Karras 6a90affa38 Fix -Wunused-lambda-capture warning 2025-03-17 20:08:19 +00:00
Joshua Vandaële 42fb43dacf
Implement multiple saves import
https://bugs.dolphin-emu.org/issues/12887
2025-03-17 10:43:09 +01:00
OatmealDome 0afbeae70c
Merge pull request #13430 from jordan-woyak/tatacon-desired-state
WiimoteEmu: Make TaTaCon DesiredState use only one byte of space.
2025-03-16 15:04:21 -04:00
OatmealDome 49bee36e6a
Merge pull request #13435 from iwubcode/uninitialized_directx
VideoCommon: initialize uninitialized state value in pixel ubershader
2025-03-16 14:56:44 -04:00
OatmealDome 9720b1f5f5
Merge pull request #13411 from jordan-woyak/gui-vconfig
DolphinQt/GeneralWidget: Eliminate unnecessary g_Config usage.
2025-03-16 14:54:24 -04:00
OatmealDome 9e513d93e1
Merge pull request #13414 from jordan-woyak/vconfig-framedump
VideoConfig: Eliminate frame dumping members.
2025-03-16 14:53:47 -04:00
OatmealDome 07cec796f4
Merge pull request #13417 from luzpaz/typo-source-core-common
Core/Common: Fix typos
2025-03-16 14:53:02 -04:00
iwubcode c5f89f2de9 VideoCommon: initialize uninitialized state value in pixel ubershader to prevent error on directx in some games 2025-03-16 11:35:56 -05:00
Jordan Woyak 48b2f7d200 VideoConfig: Eliminate frame dumping members. 2025-03-16 04:30:06 -05:00
iwubcode c1dea828ab Common: use std::chrono for GetLocalTimeSinceJan1970 on Windows
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
iwubcode 452cd1c261 Core: use more recent api in ComputeDefaultCountryCode on Windows
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
iwubcode 373a1a5dc0 Update min win10 version from 1703/15063 to 1903/18362
Co-authored-by: Shawn Hoffman <godisgovernment@gmail.com>
2025-03-16 00:59:45 -05:00
JMC47 f4c37aeb14
Merge pull request #13423 from jordan-woyak/async-request-cleanup-1
AsyncRequests Cleanups.
2025-03-15 18:17:29 -04:00
Tillmann Karras 90b6f0d16d Config: make SP2 configurable 2025-03-15 22:03:17 +00:00
Tillmann Karras 951a84833a EXI: fix AD16
The GameCube IPL is now able to detect this device. However, this
triggers some memory clearing code that trips up Dolphin's I$.
2025-03-15 22:03:16 +00:00
Jordan Woyak 6aff82eda3 WiimoteEmu: Make TaTaCon DesiredState use only one byte of space. 2025-03-15 16:48:05 -05:00
JMC47 99cde4e269
Merge pull request #13395 from jordan-woyak/vi-HORIZONTAL_BEAM_POSITION-ticks
VideoInterface: Update m_ticks_last_line_start from the event's ticks value.
2025-03-15 17:27:07 -04:00
JMC47 1bd3e79fda
Merge pull request #13378 from jordan-woyak/desired-ext-state
WiimoteEmu: Clean up variant handling in DesiredExtensionState.
2025-03-15 17:26:49 -04:00
JMC47 e3deb14156
Merge pull request #13347 from iwubcode/custom_shader_overhaul_lighting
VideoCommon: move lighting shader logic to callable functions
2025-03-15 17:26:32 -04:00
Jordan Woyak 46e0952e97 PerformanceTracker: Use SPSCQueue and atomic to eliminate need for a mutex. Clean up some math. 2025-03-15 14:40:00 -05:00
Jordan Woyak c763961112 PerformanceTracker: Use std::deque instead of hand-rolled circular
queue.
2025-03-15 14:40:00 -05:00
Jordan Woyak b2ce3fbefc PerformanceTracker: Pass chrono values instead of us s64. 2025-03-15 14:40:00 -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 225039f742
Merge pull request #13427 from LillyJadeKatrin/retroachievements-code-approval-fix
Fixed Multi Config Code Approvals
2025-03-15 13:57:48 -04:00
JosJuice f2d1918714 Fix broken merge of PR #13181
This undoes one of the changes of PR #13181. I'm guessing the relevant
code changed between when the PR was last pushed to and when it was
merged.
2025-03-15 17:23:39 +01:00
JosJuice e637a05707
Merge pull request #12866 from JosJuice/android-log-types-sorting
Android: Replace log type names map with array
2025-03-15 16:01:33 +01:00
JosJuice 1f087473aa
Merge pull request #12809 from JosJuice/jitarm64-cmp-sp
JitArm64: Replace a comparison to SP
2025-03-15 16:00:15 +01:00
JosJuice 541344ef9b
Merge pull request #13240 from thalesmg/20241225-m-known-bt-addresses-config-only
feat(linux): allow configuring real wiimotes with known bluetooth addresses
2025-03-15 15:34:49 +01:00
JosJuice 8c7ab286f5
Merge pull request #13181 from tygyh/Replace-'reinterpret_cast'
Replace 'reinterpret_cast' with 'static_cast'
2025-03-15 15:31:38 +01:00
JosJuice 3fb4084e25
Merge pull request #13345 from Tilka/unswap_depth
Fix depth texture being incorrectly affected by swap table
2025-03-15 14:30:19 +01:00
JosJuice fd2c6918fa
Merge pull request #13388 from jordan-woyak/vsync-not-recommended
DolphinQt: Don't recommend v-sync for optimal frame pacing in tool-tip.
2025-03-15 14:24:29 +01:00
LillyJadeKatrin 0615ade725 Fixed Multi Config Code Approvals
Refactors the AR/Gecko/Patch code approval process to verify from every possible game ini, not just the base game ID. This fixes codes on specific revisions or codes general to any region.
2025-03-15 07:57:16 -04:00
Jordan Woyak 2690a62949 Core: Remove unused GetActualEmulationSpeed function and related variables/functions. 2025-03-14 03:10:13 -05:00
Jordan Woyak e1745f682f PerformanceMetrics: Eliminated a mutex. Code cleanups. 2025-03-14 03:10:13 -05:00
Sam Belliveau f09ba10daa AudioCommon: Added Granular Synthesis 2025-03-14 01:22:35 -05:00
Jordan Woyak 6c158ed590 VideoCommon: Create AsyncRequests directly in MMU code to eliminate EFB-related functions in VideoBackendBase. 2025-03-14 01:14:51 -05:00
Jordan Woyak 63b848ca93 VideoCommon: Eliminate EFBAccessType enum. Eliminate union and switch statement handler in AsyncRequests. 2025-03-14 00:59:41 -05:00
iwubcode 15372dc835 VideoCommon: move lighting shader logic to callable functions 2025-03-13 23:56:04 -05:00
JMC47 ca9b34a6d1
Merge pull request #13394 from jordan-woyak/odd-even-pacing
VideoInterface: Adjust even-field to match odd-field pacing when PSB values differ.
2025-03-13 21:56:36 -04:00
JMC47 0e2785a562
Merge pull request #13387 from jordan-woyak/frame-pacing
CoreTiming: Improve frame pacing
2025-03-13 14:23:18 -04:00
Jordan Woyak fdf00050a6 DolphinQt: Use tooltips on Advanced tab. 2025-03-13 05:32:16 -05:00
Jordan Woyak 5b36c13bfb VideoCommon: Rename Renderer to EFBInterface. 2025-03-12 21:09:16 -05:00
Luz Paz 1b47dbf519 Core/Common: Fix typos
Found via `codespell -q 3 -S "./Externals,./Data/Sys/wiitdb-??.txt,*.po,*.pot" -L andf,asnd,bootup,brocken,bufferin,clen,collet,datas,delt,diety,extint,fpr,inout,inport,interm,nd,nin,ontop,pixelx,re-use,re-used,sav,stateman,strat,transer,wil`
2025-03-11 19:48:45 -04:00
JMC47 de997d616f
Merge pull request #13416 from jordan-woyak/unused-viewport-correction
VertexShaderManager: Eliminate unnecessary m_viewport_correction member.
2025-03-11 19:00:55 -04:00
JMC47 b7bd0a0836
Merge pull request #13413 from jordan-woyak/vconfig-progressive
VideoConfig: Eliminate bForceProgressive.
2025-03-11 18:59:28 -04:00
JMC47 67c8d5640f
Merge pull request #13412 from jordan-woyak/netplay-vconfig
VideoConfig: Eliminate NetPlay related members.
2025-03-11 18:59:02 -04:00
JMC47 1698daef66
Merge pull request #13410 from jordan-woyak/movie-vconfig
Movie: Eliminate MovieManager::SetGraphicsConfig.
2025-03-11 18:58:45 -04:00
Jordan Woyak c191ed5321 VertexShaderManager: Eliminate unnecessary m_viewport_correction member. 2025-03-11 03:55:57 -05:00
Jordan Woyak 5b88c0b90e DolphinQt/GeneralWidget: Eliminate unnecessary g_Config usage. 2025-03-10 20:19:45 -05:00
Jordan Woyak de01a790e1 VideoConfig: Eliminate bForceProgressive. 2025-03-10 19:02:43 -05:00
Jordan Woyak 7f3d8a1ad4 VideoConfig: Eliminate NetPlay related members. 2025-03-10 18:53:44 -05:00
Jordan Woyak 44423a3656 Movie: Eliminate MovieManager::SetGraphicsConfig. 2025-03-10 18:16:49 -05:00
Jordan Woyak 7222188cde Core/VideoCommon: Push presentation time calculated from CPU thread to GPU thread. 2025-03-10 16:40:46 -05:00
Jordan Woyak c4bd98c626 VideoInterface: Throttle before VBlank statistics counting. 2025-03-10 16:40:46 -05:00
Jordan Woyak 9ac9813492 SystemTimers: Throttle prior to performance marker. 2025-03-10 16:40:46 -05:00
Jordan Woyak aa624d8ba8 BTEmu: Throttle prior to wii remote input update. 2025-03-10 16:40:46 -05:00
Jordan Woyak 9675c90890 VideoInterface: Throttle prior to SI poll. 2025-03-10 16:40:46 -05:00
Jordan Woyak 81e842e2aa CoreTiming: Don't Throttle in event queue processing. 2025-03-10 16:39:13 -05:00
Jordan Woyak fe2d247acb VideoCommon: Don't merge EFBPoke AsyncRequests. 2025-03-10 16:37:24 -05:00
mitaclaw 433c6ce0f2 GCC: Remedy NRVO Fails
Using the `-Wnrvo` flag introduced by GCC 14, I identified a few places where NRVO was clearly intended, but is fumbled.
2025-03-10 12:38:03 -07:00
JMC47 5ed8b7bc9d
Merge pull request #13403 from jordan-woyak/backend_info
VideoCommon: Move backend_info out of VideoConfig struct.
2025-03-10 15:06:19 -04:00
JMC47 d45e6c6729
Merge pull request #13401 from jordan-woyak/exit-gpu-loop
Core/VideoBackendBase: Call ExitGpuLoop from Core to eliminate Video_ExitLoop.
2025-03-10 15:05:30 -04:00
JMC47 203454a97a
Merge pull request #13396 from jordan-woyak/vi-odd-even
VideoInterface: Cleanup and minor fix in Update.
2025-03-10 15:05:12 -04:00
JMC47 ff4486ee23
Merge pull request #13340 from Dentomologist/state_show_decompressing_osd_longer
State: Show "Decompressing State..." OnScreenDisplay message for longer
2025-03-10 15:04:50 -04:00
JMC47 189d09011b
Merge pull request #13363 from JoshuaVandaele/nowarnings
Fix multiple minor warnings
2025-03-10 15:04:14 -04:00
JMC47 3f73a39dbd
Merge pull request #13286 from JoshuaVandaele/xcb
Enforce XCB within code
2025-03-10 15:03:54 -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 e4efe011d7 Modernize `std::max_element` with ranges and projections 2025-03-09 13:26:39 -07:00
mitaclaw 258ec4f9cd Modernize `std::lower_bound`/`upper_bound` with ranges and projections 2025-03-09 13:26:38 -07:00
mitaclaw c9f589faa5 Modernize `std::stable_sort` with ranges and projections 2025-03-09 13:26:38 -07:00
mitaclaw 8b9f92a0af Modernize `std::sort` with ranges and projections
In PPCTables.cpp, the code is currently unused so I was unable to test it.

In CustomPipeline.cpp, a pointer to member function cannot be used due to 16.4.5.2.1 of the C++ Standard regarding "addressable functions". https://eel.is/c++draft/namespace.std#6

In Fs.cpp and DirectoryBlob.cpp, these examples used projections in a previous iteration of this commit, but no longer do. Still, they remain in this commit because the PR they would actually belong to is already merged.
2025-03-09 13:26:38 -07:00
mitaclaw 9f972db4b8 Modernize `std::none_of` with ranges and projections 2025-03-09 13:26:37 -07:00
mitaclaw 00e147c722 Simplify `std::count_if` with `std::ranges::count` and projections 2025-03-09 13:26:37 -07:00
mitaclaw 62b2b939b5 Simplify `std::find_if` with `std::ranges::find` and projections
In LabelMap.cpp, the code is currently unused so I was unable to test it.

In WiiUtils.cpp, the magic value `1u` was replaced by the constant value `DiscIO::PARTITION_UPDATE`.
2025-03-09 13:26:35 -07:00
mitaclaw 1e5e9219cd Common: Create Range Projections For `std::pair` 2025-03-09 13:19:41 -07:00
JosJuice 87496205aa
Merge pull request #13404 from luzpaz/typo-source-core-windupdater
Core/WinUpdater: fix typo
2025-03-09 12:03:56 +01:00
Jordan Woyak c18c039089 VideoCommon: Move backend_info out of VideoConfig struct. 2025-03-09 01:42:45 -06:00
Luz Paz fb6c625fed Core/Core: fix typos
Found via `codespell -q 3 -S "./Externals,./Data/Sys/wiitdb-??.txt,*.po,*.pot" -L andf,asnd,bootup,bufferin,clen,collet,datas,delt,fpr,inout,inport,interm,pixelx,re-use,re-used,sav,stateman,strat,wil`
2025-03-08 15:41:53 -05:00
Luz Paz 9b7d494bd4 Core/WinUpdater: fix typo 2025-03-08 09:58:50 -05:00
Jordan Woyak 7925240107 Core/VideoBackendBase: Call ExitGpuLoop from Core to eliminate Video_ExitLoop. 2025-03-07 17:30:33 -06:00
Jordan Woyak 5ff2af9b6a VideoInterface: Cleanup and minor fix in Update. 2025-03-04 20:39:14 -06:00
Jordan Woyak 16d75eadb5 VideoInterface: Update m_ticks_last_line_start from the event's ticks
value rather than the potentially "cycles late" value.
2025-03-04 15:33:51 -06:00
Jordan Woyak b28dcf3687 VideoInterface: Adjust even-field to match odd-field pacing when PSB values differ. 2025-03-04 04:52:24 -06:00
Admiral H. Curtiss 3c5da38177
Merge pull request #13390 from jordan-woyak/ciface-clock
InputCommon: Use Clock from CommonTypes.
2025-03-03 22:29:25 +01:00
Jordan Woyak e217d6c939 InputCommon: Use Clock from CommonTypes. 2025-03-02 15:42:26 -06:00
iwubcode 6dedf11c96 VideoCommon: mark 'WriteTexCoordTransforms' as 'static' 2025-03-02 11:27:54 -06:00
Jordan Woyak 5d16c51963 DolphinQt: Don't recommend v-sync for optimal frame pacing in tool-tip. 2025-03-02 05:43:00 -06:00
JMC47 65726b7b5f
Merge pull request #13374 from Dentomologist/performancemetrics_clamping_resetting_and_add_setting
PerformanceMetrics: Add clamping, resetting on resize, and setting
2025-02-26 19:44:13 -05:00
Jordan Woyak 3f92f86de1 WiimoteEmu: Add a static_assert in DesiredExtensionState to keep variant alternative order consistent. 2025-02-25 17:22:59 -06:00
Jordan Woyak 0d0734e083 WiimoteEmu: Clean up variant handling in DesiredExtensionState. 2025-02-25 17:22:59 -06:00
Jordan Woyak 1d481a395a VariantUtil: Introduce WithVariantAlternative to dynamically construct and visit a variant alternative. 2025-02-25 17:22:59 -06:00
Tillmann Karras 4e460a7968 UberShaderPixel: use unswapped texture samples for depth 2025-02-25 18:45:01 +00:00
Tillmann Karras 359fb51d64 PixelShaderGen: use unswapped texture samples for depth 2025-02-25 18:45:01 +00:00
Tillmann Karras 7abb9e7974 Sofware/Tev: use unswapped texture samples for depth 2025-02-25 18:45:01 +00:00
Tilka 030892abd9
Merge pull request #13369 from Tilka/qt_warnings
CMake: disable Qt deprecation warnings we can't fix
2025-02-25 18:32:28 +00:00
JosJuice 89277ee52e
Merge pull request #13376 from jordan-woyak/serialized-wm-irext
WiimoteEmu: Make SerializedWiimoteState store camera points as IRExtended instead of custom layout.
2025-02-25 17:49:51 +01:00
Joshua Vandaële 0a83783fae
Migrate to SFML>=3.0.0 2025-02-25 06:42:13 +01:00
Jordan Woyak 104a25fe0d DolphinQt: Fix MappingButton not updating text on middle-click clear. 2025-02-24 21:17:41 -06:00
Jordan Woyak e5b55bfc06 WiimoteEmu: Make SerializedWiimoteState store camera points as IRExtended instead of custom layout. 2025-02-24 16:29:07 -06:00
Dentomologist 0645a267d9 PerformanceMetrics: Add clamping, resetting on resize, and setting
Clamp overlays to the render window (with some padding), reset their
positions when the render window changes sizes, and add a setting to
enable moving the overlays (off by default, .ini only for now).
2025-02-24 13:17:57 -08:00
JosJuice 7679b0e955
Merge pull request #13370 from JosJuice/i18n-pack-sd
Common: Make SD pack/unpack strings translatable
2025-02-24 18:57:55 +01:00
Tilka 4d1737e423
Merge pull request #13371 from Florin9doi/prusb1
USB: Remove unused parameters
2025-02-24 05:20:30 +00:00
JosJuice 0f83598493 Common: Make SD pack/unpack strings translatable
Regression from adc5b81.
2025-02-23 23:09:24 +01:00
Florin9doi 7afc3df76f USB: Infinity window icon 2025-02-24 00:08:42 +02:00
Florin9doi 51dc3ff466 USB: Remove unused params 2025-02-24 00:07:28 +02:00
Thales MG 97bc28aac4 feat(linux): allow configuring real wiimotes with known bluetooth addresses
This adds the option to configure real Wiimotes by specifying their Bluetooth addresses in
the configuration file.  This allows off-brand Wiimotes to work without using the
Bluetooth Passthrough option, if you know their Bluetooth addresses beforehand.

Despite correctly setting the LAP to `0x9e8b00` in `WiimoteScannerLinux::FindWiimotes`
while scanning, which is indeed enough to make off-brand / knock-off Wiimotes respond to a
Bluetooth Inquiry, some (several? all?) bluetooth adapters seem to override and ignore
this given LAP value when performing the Inquiry, and actually use the `0x9e8b33` value as
if a null pointer have been given to `hci_inquiry`, as inspection of USB/Bluetooth packets
by Wireshark indicate.  Off-brand Wiimotes don't respond to inquiries with this LAP.

If one happens to know the Bluetooth address of their Wiimote (for example, by checking
`BluetoothPassthrough.LinkKeys` after using Bluetooth Passthrough, or other means such as
directly using `libusb` to force the adapter to use the correct LAP in the Inquiry), then
it's enough to add those addresses to the vector of found Wiimotes.

Since this a niche use case and I only happen to know and have tested in Linux, this
change only affects the `WiimoteScannerLinux` backend.  It's likely that it could be added
to other backends, but I'm unfamiliar with these.

If no addresses are given or this config section does not exist, behavior is completely
unchanged.
2025-02-23 18:27:48 -03:00
Tillmann Karras a8363854ee CMake: disable Qt deprecation warnings we can't fix 2025-02-23 14:18:05 +00:00
JMC47 6d9c887a21
Merge pull request #13365 from jordan-woyak/si-disco
SI: Set NOREP, ERRSTAT, and ERRLATCH when GetData returns false.
2025-02-23 01:23:39 -05:00
JMC47 aabde71484
Merge pull request #13348 from jordan-woyak/movie-SerializedWiimoteState
Core/Movie: Make DTM Wii Remote data use SerializedWiimoteState.
2025-02-22 14:08:41 -05:00
Jordan Woyak 8431c23cbc SI: Set NOREP, ERRSTAT, and ERRLATCH when GetData returns false. 2025-02-22 09:25:57 -06:00
JMC47 43a6ec5bbd
Merge pull request #13353 from iwubcode/custom_shader_overhaul_vertex_texcoord
VideoCommon: move texcoord calculations to accessible functions in VertexShaderGen
2025-02-22 02:32:47 -05: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
JosJuice af064c57de
Merge pull request #13219 from Tilka/cp_cleanup
VideoCommon: drop CP MMIO registers that were probably added in the wrong place
2025-02-17 21:27:19 +01:00
Aneesh Maganti fffb499da2
Core/HW: Add time tracking thread in CPU manager
Introduce method to track the time played for a game via time differences and TimePlayed methods. Threads are synchronized via Common::Event.
2025-02-16 23:15:12 +01:00
Aneesh Maganti 3c44fe592b
DolphinQt: Add "Time Played" column to game list view
Shows minutes/hours in the list view and handles column visibility.
2025-02-16 23:15:11 +01:00
Aneesh Maganti 276f043db8
DolphinQt: Create toggle for enabling/disabling time tracking
Introduce a new "Enable Time Tracking" checkbox in the InterfacePane UI. The checkbox is dynamically enabled or disabled based on the emulation state, preventing changes while emulation is active.
2025-02-16 23:15:11 +01:00
Aneesh Maganti a9ebedbf7d
Core/Config: Add settings for time tracking 2025-02-16 23:15:11 +01:00
Aneesh Maganti 892d6e30df
Core/ConfigManager: Add locks for metadata methods
All metadata access methods now acquire a lock on `m_metadata_lock` to prevent race conditions.
2025-02-16 23:15:11 +01:00
Aneesh Maganti 803241c64b
Core: Add TimePlayed class to track game playtime
Creates TimePlayed class and implemented constructors, AddTime, GetTimePlayed, and Reload methods. Updates CMakeLists.txt and DolphinLib.props as appropriate.
2025-02-16 23:15:11 +01:00
Admiral H. Curtiss aced90de97
Merge pull request #13329 from noahpistilli/guard-startup-patches
Core: Check if msr.DR and msr.IR are valid at ApplyStartupPatches
2025-02-16 16:14:35 +01:00
JMC47 343007fa9e
Merge pull request #13343 from jordan-woyak/dark-theme-indicator-gate-colors
DolphinQt/Mapping: Adjust dark theme indicator gate color calculation.
2025-02-15 16:34:30 -05:00
Jordan Woyak 66624abb12 DolphinQt/Mapping: Clear and skip "Modifier" iterative input mappings when using
analog inputs.
2025-02-15 14:15:51 -06:00
Jordan Woyak 3189de6c7a DolphinQt: Add setting to enable iterative input mappings. 2025-02-15 14:15:51 -06: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
JMC47 c360ea0d9d
Merge pull request #13344 from Tilka/dither
VideoCommon: simplify dither calculation
2025-02-15 00:32:14 -05:00
JMC47 0fc36bbfa9
Merge pull request #13341 from jordan-woyak/sd-convert-buttons-rename
DolphinQt: Rename the pack/unpack SD Card buttons.
2025-02-15 00:31:40 -05:00
JMC47 f9accfd4d6
Merge pull request #13324 from Sintendo/jitarm64-cmp-imm
JitArm64_Integer: cmp/cmpl optimizations
2025-02-15 00:30:34 -05:00
JMC47 ac2026dd6e
Merge pull request #13322 from Xphalnos/D3D_Update
VideoBackends: Use DXGI 1.6 and D3D11_4
2025-02-15 00:30:13 -05:00
iwubcode 1ce78dd9b4 VideoCommon: move texcoord calculations to accessible functions in VertexShaderGen 2025-02-14 22:44:49 -06:00
Jordan Woyak 7a37d015b7 DolphinAnalytics/WiimoteEmu: Remove now-irrelevant game quirk check. 2025-02-13 17:39:54 -06:00
Jordan Woyak 59d25aceb6 WiimoteEmu: Removed unused Extension encryption key getter. 2025-02-12 23:42:44 -06:00
Jordan Woyak 83d4249838 Core/Movie: Make DTM Wii Remote data use SerializedWiimoteState. 2025-02-12 23:42:43 -06:00
Jordan Woyak adc5b81c31 DolphinQt: Rename the pack/unpack SD Card buttons. 2025-02-12 13:30:48 -06:00
Tillmann Karras 5db6bd6054 VideoCommon: simplify dither calculation
This saves three instructions on AMD GPUs. Dunno about Nvidia.
2025-02-11 19:23:37 +00:00
Jordan Woyak 165e35ed5d DolphinQt/Mapping: Adjust dark theme indicator gate color calculation. 2025-02-10 01:15:58 -06:00
Tillmann Karras 19d954eaea VideoCommon: remove CP readonly field, it's now always false 2025-02-08 11:46:49 +00:00
Tillmann Karras 84e72c185a VideoCommon: drop CP MMIO registers that were probably added in the wrong place
I think someone confused these with the actual token and bounding box
registers in PE, which were added later. In CP they never did anything
and it's suspicious that they have the same addresses as their PE
counterparts. On real hardware they always read as zero.
2025-02-08 11:46:49 +00: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
Dentomologist 363155b597 State: Increase Decompressing OSD message duration
Show the "Decompressing State..." message for 2 seconds, instead of the
half-second duration that caused it to be halfway faded out immediately.
2025-02-06 17:17:18 -08:00
Admiral H. Curtiss c6be362a8c
Merge pull request #13334 from jordan-woyak/mplus-lround
WiimoteEmu/MotionPlus: Gyro data calculation cleanup.
2025-02-06 22:20:24 +01:00
Admiral H. Curtiss b1f1d7d6a7
Merge pull request #13327 from jordan-woyak/input-expressions-compound-assignment
InputCommon/ExpressionParser: Add compound assignment operators.
2025-02-06 22:15:51 +01:00
Admiral H. Curtiss 05f217bd0b
Merge pull request #13330 from Dentomologist/performancemetrics_allow_moving_overlays
PerformanceMetrics: Allow users to move overlays
2025-02-06 21:56:57 +01:00
Admiral H. Curtiss dcfb1361d2
Merge pull request #13223 from mitaclaw/branch-watch-tool-fixes-5
Branch Watch Tool: Refresh Context Menus OnEmulationStateChanged
2025-02-06 21:52:50 +01:00
JosJuice db285b7c87
Merge pull request #13319 from hoogmin/infinite-style-fix
Refactor: Infinite loop in AsyncShaderCompiler according to style guidelines
2025-02-06 18:31:28 +01:00
Javier Martinez 7dec083af5 Refactor: Make loop non-infinite instead in AsyncShaderCompiler. 2025-02-05 20:06:59 -05:00
Admiral H. Curtiss 6ee08fb9db
Merge pull request #13302 from TryTwo/Breakpoints_Fix_Lag
Breakpoints: Fix lag when loading multiple memory breakpoints
2025-02-05 18:27:22 +01:00
TryTwo bbf72e79f9 Breakpoints: Fix lag when adding or removing multiple memory breakpoints by only calling DBATUpdated() once. 2025-02-04 00:21:13 -07:00
Jordan Woyak c857a7dd82 WiimoteEmu: Use a named constant instead of a magic number for speaker
data writes.
2025-02-03 19:52:38 -06:00
Jordan Woyak 857c93c529 WiimoteEmu/MotionPlus: Gyro data calculation cleanup. 2025-02-03 02:05:47 -06:00
Dentomologist 4b8e36cba9 PerformanceMetrics: Allow users to move overlays
Allow users to move the FPS, VPS, Speed, and Performance Graph overlays.
2025-02-02 19:40:01 -08:00
Sketch 4499718368 Core: Check if msr.DR or msr.IR are valid at ApplyStartupPatches 2025-02-02 17:27:16 -05:00
Dentomologist f94e6cb73e PerformanceMetrics: Call ImGui::End() unconditionally
Move ImGui::End() calls out of if(ImGui::Begin()) blocks.

Quoting from ImGui::Begin's function comment in imgui.cpp:
"You always need to call ImGui::End() even if false is returned."

In practice this didn't cause problems because the windows don't have
title bars and thus can't be collapsed, and so the block containing
::End would always run, but let's do it the right way.
2025-02-02 14:14:56 -08:00
Jordan Woyak cdabd651aa InputCommon/ExpressionParser: Add compound assignment operators. 2025-02-02 14:37:11 -06:00
Admiral H. Curtiss f1fe32c93b
Merge pull request #13254 from brad0/openbsd_aarch64
ArmCPUDetect: Add OpenBSD support for elf_aux_info
2025-02-02 18:12:03 +01: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 017e0b5658
Merge pull request #13306 from OatmealDome/cubeb-optional
CMakeLists: Add flag to disable Cubeb
2025-02-02 17:50:20 +01:00
Admiral H. Curtiss 6a3a74508d
Merge pull request #13317 from cristian64/spurious_config_file
DolphinQt: Use global settings object also for debugger settings.
2025-02-02 17:25:24 +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
Sintendo 755c003265 JitArm64_RegCache: Const correctness
Forgot this when I added it in #13120.
2025-02-02 12:57:59 +01:00
Sintendo 7ce7da629e JitArm64_Integer: cmpl - Subtract shifted 12-bit constant
You can encode a shifted 12-bit immediate in a SUB instruction on ARM64.
We exploit this to avoid materializing the immediate.

This approach saves an instruction if it does not need to be
materialized in a register afterwards. Otherwise, we just materialize
it later and the total number of instructions stays the same.

Before:
0x52a00218   mov    w24, #0x100000            ; =1048576
0xcb180379   sub    x25, x27, x24

After:
0xd1440379   sub    x25, x27, #0x100, lsl #12 ; =0x100000
2025-02-02 12:57:59 +01:00
Sintendo b7c3f91643 JitArm64_Integer: cmpl - Subtract 12-bit constant
You can encode a 12-bit immediate in a SUB instruction on ARM64. We can
exploit this to avoid materializing the immediate.

This approach saves an instruction if it does not need to be
materialized in a register afterwards. Otherwise, we just materialize
it later and the total number of instructions stays the same.

Before:
0x5280003a   mov    w26, #0x1                 ; =1
0xcb1a033b   sub    x27, x25, x26

After:
0xd100073b   sub    x27, x25, #0x1
2025-02-02 12:57:59 +01:00
Sintendo c5870ed0c7 JitArm64_Integer: cmp - Skip sign extension if possible
While we cannot always avoid materializing immediates, we can still
inspect the most significant bit and potentially skip sign extension.
This can sometimes save an instruction.

Before:
0x5280003a   mov    w26, #0x1                 ; =1
0x93407f5b   sxtw   x27, w26
0xcb38c37b   sub    x27, x27, w24, sxtw

After:
0x5280003a   mov    w26, #0x1                 ; =1
0xcb38c35b   sub    x27, x26, w24, sxtw

Before:
0x52a20018   mov    w24, #0x10000000          ; =268435456
0x93407f79   sxtw   x25, w27
0xcb38c339   sub    x25, x25, w24, sxtw

After:
0x52a20018   mov    w24, #0x10000000          ; =268435456
0x93407f79   sxtw   x25, w27
0xcb180339   sub    x25, x25, x24
2025-02-02 12:57:49 +01:00
Sintendo 075c35602f JitArm64_Integer: cmp - Add shifted 12-bit constant
You can encode a shifted 12-bit immediate in an ADD instruction on
ARM64. If the negated constant fits in this range, we can exploit this
to avoid materializing the immediate.

This approach saves an instruction if it does not need to be
materialized in a register afterwards. Otherwise, we just materialize
it later and the total number of instructions stays the same.

Before:
0x52bff01a   mov    w26, #-0x800000           ; =-8388608
0x93407f1b   sxtw   x27, w24
0xcb3ac37b   sub    x27, x27, w26, sxtw

After:
0x93407f1b   sxtw   x27, w24
0x9160037b   add    x27, x27, #0x800, lsl #12 ; =0x800000
2025-02-02 12:01:08 +01:00
Sintendo 01eed0a758 JitArm64_Integer: cmp - Add 12-bit constant
You can encode a 12-bit immediate in an ADD instruction on ARM64. If the
negated constant fits in this range, we can exploit this to avoid
materializing the immediate.

This approach saves an instruction if it does not need to be
materialized in a register afterwards. Otherwise, we just materialize
it later and the total number of instructions stays the same.

Before:
0x12800019   mov    w25, #-0x1                ; =-1
0x93407f5b   sxtw   x27, w26
0xcb39c37b   sub    x27, x27, w25, sxtw

After:
0x93407f5b   sxtw   x27, w26
0x9100077b   add    x27, x27, #0x1
2025-02-02 12:01:05 +01:00