Commit Graph

31748 Commits

Author SHA1 Message Date
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
d296b2613c Modernize std::adjacent_find with ranges 2024-10-10 15:28:11 -07:00
e4fb837f4b Modernize std::find_if with ranges
In BTEmu.cpp, `std::mem_fn` was not necessary for the predicate to compile.
2024-10-10 15:28:11 -07:00
6ca7e2856b Modernize std::find with ranges 2024-10-10 15:28:11 -07:00
a9a779a6b9 JitArm64_Integer: Use IsImm helper more 2024-10-10 22:21:31 +02:00
0d9984b299 JitArm64_SystemRegisters: Optimize mtspr
No need to materialize the immediate if it is zero, we can just use WZR.

Before:
mov    w27, #0x0                 ; =0
str    w27, [x29, #0x1178]

After:
str    wzr, [x29, #0x1178]
2024-10-10 22:16:28 +02:00
8304ae3361 JitArm64_RegCache: Add IsImm helper
Because checking if a register is a specific immediate is a rather
common operation.
2024-10-10 22:13:34 +02:00
e572081ac3 Modernize std::min_element with ranges 2024-10-10 00:53:48 -07:00
c99a0c25e0 Modernize std::max_element with ranges 2024-10-10 00:53:48 -07:00
88a1a5b4f2 Modernize std::set_intersection with ranges 2024-10-10 00:53:48 -07:00
728663bdc0 Modernize std::binary_search with ranges
In VolumeVerifier.cpp, constructing a `std::string_view` of the volume's GameID is unnecessary, as `std::`(`ranges::`)`binary_search` supports heterogeneous lookup. The usage in GameFile.cpp is a perfect example.
2024-10-10 00:53:48 -07:00
01d0bdf1bb Modernize std::is_sorted with ranges
In OGLConfig.cpp, `std::views::reverse` is used rather than sorting using `std::ranges::greater` in order to parallel other instances of reverse iteration in the function.
2024-10-10 00:53:48 -07:00
ebf7cebc32 Modernize std::sort with ranges 2024-10-10 00:53:48 -07:00
bcaf665d14 Modernize std::reverse_copy with ranges 2024-10-10 00:53:48 -07:00
78440ca335 Modernize std::reverse 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
a7160c7b38 Modernize std::replace_if with ranges 2024-10-10 00:53:48 -07:00
0a80243a92 Modernize std::replace with ranges 2024-10-10 00:53:48 -07:00
72436a0d1f Modernize std::transform with ranges
In StringUtil.h, the lambdas wrapping `Common::ToLower(char)` and `Common::ToUpper(char)` were only necessary due to the function names being overloaded.
2024-10-10 00:53:48 -07:00
7ce170f138 Modernize std::copy with ranges 2024-10-10 00:53:48 -07:00
249defa72b Modernize std::equal with ranges 2024-10-10 00:53:48 -07:00
4cc5e1972a Modernize std::count_if with ranges 2024-10-10 00:53:48 -07:00
c46060e298 Modernize std::count with ranges 2024-10-10 00:53:48 -07:00
ed5eb49d47 Modernize std::for_each with ranges 2024-10-10 00:53:48 -07:00
e96960e2a6 VideoCommon: fix common opcode decoding errors
Many games call GXSetGPFifo() without first waiting for the GP to finish
consuming outstanding commands in the previous GP fifo. Normally,
Dolphin runs OpcodeDecoding in 1000-cycle time slices. In that time
frame, GXSetGPFifo() has probably completed and the GP read pointer now
points to entirely new memory. If the last GP fifo copy ended in an
incomplete command, the new GP fifo would most likely desync for a
while. To avoid all this, give the GP a time slice right now to copy the
remaining data from the previous GP fifo.
2024-10-10 04:07:44 +01:00
519da8297c Simplify std::stable_sort with std::ranges::stable_partition 2024-10-09 17:26:10 -07:00
e6f93efac4 Simplify std::transform with std::ranges::transform_view 2024-10-09 17:26:10 -07:00
809766a439 Simplify std::fill with std::array::fill 2024-10-09 17:26:10 -07:00
3c11360335 IOS: log cIOS device checks as warnings, not errors
Some games do this to detect piracy.
2024-10-09 21:18:36 +01:00
7db13d23c9 Merge pull request #13086 from Tilka/gameini
GameSettings: safe texture cache for "Winter Sports 3: The Great Tournament"
2024-10-09 02:06:51 +02:00
b6ec8ddc20 Simplify std::fill with std::fill_n 2024-10-07 15:34:56 -07:00
7c96762f5f Simplify std::copy with std::copy_n
+ a surprise `std::memcpy` in VolumeVerifier.cpp.
2024-10-07 15:34:56 -07:00
2b22e6ffc9 Merge pull request #13109 from Pokechu22/fifo-player-wii-bats
FifoPlayer: Set up additional BATs in Wii mode
2024-10-07 17:42:54 +01:00
929bcbdde9 Fifo analyzer: Fix indexed XF loads showing "bytes" instead of "words"
Indexed XF loads specify the number of 32-bit words (generally floats, but light data has some integers) to load, not the number of bytes. This was only a mistake in the fifo analyzer text; the actual implementation already loaded words.
2024-10-06 21:56:48 -07:00
de61430dae FifoPlayer: Set up additional BATs in Wii mode
The light LIT fifolog from https://bugs.dolphin-emu.org/issues/13635 has position data at physical address 11ae3180. This works fine when using the memory viewer in physical mode, but the corresponding virtual address (91ae3180) previously didn't show anything in effective mode. It works fine now though.

This shouldn't affect playback of fifologs as everything in there uses physical addresses; this only impacts the memory viewer.

This logic was copied from CBoot::SetupBAT.
2024-10-06 21:48:34 -07:00
339f9311fb Merge pull request #12918 from JosJuice/revert-revert-audit-get-state
Partially revert "Revert "Audit uses of IsRunning and GetState""
2024-10-06 11:26:06 -04:00
d78b76790d Merge pull request #13105 from lycheefox/skylanders
Skylanders: Fix Head Rush (Nitro)
2024-10-06 11:21:32 -04:00
1454934a07 VideoBackends:Metal: Use standardized C++ features over clang builtins 2024-10-06 02:13:48 -05:00
32fd10bd08 VideoBackends:Metal: Log file on failed pipeline compile 2024-10-06 02:13:48 -05:00
ad1109e191 Skylanders: Fix Head Rush (Nitro) 2024-10-05 22:14:17 -04:00
9244cded9f VideoBackends:Vulkan: Increase VMA Vulkan Version to 1.2
We now use Vulkan 1.2 if available
2024-10-05 16:51:14 -05:00
d1ac40a72b Merge pull request #13101 from JosJuice/gametdbid-partition
Core: Include partition when calling GetGameTDBID for non-game partition
2024-10-05 22:31:58 +01:00
b191c0f7d8 Merge pull request #12208 from PatrickFerry/add-vertex-depth-range-case
Use Vertex Depth Range when zRange Exceeds farZ
2024-10-05 14:14:11 +02:00
6798f63a2e Core: Include partition when calling GetGameTDBID for non-game partition
This problem was introduced in 8842a0f402
and is likely a copy-paste error.

Fixes the problem mentioned in the issue comment
https://bugs.dolphin-emu.org/issues/13640#note-2.
2024-10-05 13:04:50 +02:00
2d9f789940 Merge pull request #13050 from TellowKrinkle/HKIsNotMVK
Vulkan: Don't do MoltenVK things on Asahi Linux
2024-10-05 00:51:27 -04:00
ae14abb2fa Merge pull request #13088 from TellowKrinkle/iOSFixes
VideoBackends:Metal: Fix bbox on newer iOS devices
2024-10-04 17:32:44 -04:00
6ca2da53e8 Partially revert "Revert "Audit uses of IsRunning and GetState""
This reverts the revert commit bc67fc97c3,
except for the changes in BaseConfigLoader.cpp, which caused the bug
that made us revert 72cf2bdb87. PR 12917
contains an improved change to BaseConfigLoader.cpp, which can be merged
(or rejected) independently.

A few changes have also been made based on review comments.
2024-10-04 18:35:41 +02:00
2da3e49b1e Merge pull request #13078 from Dentomologist/videobackendbase_only_populate_backend_info_when_uninitialized
VideoBackendBase: Only populate backend info when uninitialized
2024-10-04 18:31:06 +02:00
76287f3810 Merge pull request #13097 from Tilka/vidpid
Bluetooth: show vid:pid in error message
2024-10-03 19:05:56 +02:00
a36746a79a Turn off debug mode if hardcore is active on emulator start
Found this bug while testing; if I manually edit the config files while Dolphin is closed I was able to get debug and hardcore on at the same time, this resolves that.
2024-10-03 09:01:00 -04:00