Commit Graph

43784 Commits

Author SHA1 Message Date
2d9a61bd0e Externals/zstd: Disable ASM for MSVC compiler in CMake
Results in a "MSVC_RUNTIME_LIBRARY value 'MultiThreadedDLL' not known for this ASM compiler" otherwise, and zstd doesn't support the relevant ASM code for MSVC anyway.
2025-04-30 20:32:01 +02:00
852bd6df1a Merge pull request #13598 from AdmiralCurtiss/zstd157
Externals: Update zstd from 1.4.4 to 1.5.7
2025-04-30 19:06:52 +02:00
7e2565ae49 Update rcheevos submodule 2025-04-30 08:16:06 -04:00
0b0151770a Merge pull request #13436 from JoshuaVandaele/clang-format-19
Update clang-format to version 19
2025-04-30 01:17:31 -04:00
23a5ea3504 Merge pull request #13604 from fox8091/nstrike
GameINI: Disable Dual Core for NERF N-Strike
2025-04-29 14:56:32 -04:00
b49711fefb Merge pull request #13600 from JoshuaVandaele/nixfix
CMake: Explicitely link udev if LIBUDEV_FOUND is set
2025-04-29 14:55:50 -04:00
d591e3b4e3 GameINI: Enable Single Core for Kung Fu Panda and Shrek Forever After
These games (both are made with the Lux Engine) randomly freeze with Dual Core.
2025-04-29 11:35:09 +02:00
7fa92160a2 Android: Don't call NativeLibrary methods during class init
There's no guarantee that directory initialization has completed by this
point, so we can't safely use NativeLibrary.

I'm making this change because of a crash being reported in Google Play
Console. The exact way it's crashing is mysterious to me, so I'm not
sure if this commit fixes the crash, but I think this commit is
a reasonable change to make even if it doesn't fix the crash. Backtrace
from Google Play Console:

  #00  pc 0x0000000000469074  /data/app/~~m0kqybFNfeqnDenQFc53XQ==/org.dolphinemu.dolphinemu-Mtaw0lU8DVUQbte2ZjBp3w==/lib/arm64/libmain.so (std::__ndk1::pair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>::pair[abi:nn180000]<char const* const&, char const* const&, 0>(char const* const&, char const* const&)) (BuildId: 64cfebf5b574b6729ebc51799aa94ccc3238cbcc)
  #01  pc 0x0000000000468e9c  /data/app/~~m0kqybFNfeqnDenQFc53XQ==/org.dolphinemu.dolphinemu-Mtaw0lU8DVUQbte2ZjBp3w==/lib/arm64/libmain.so (std::__ndk1::pair<std::__ndk1::__tree_iterator<std::__ndk1::__value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>, std::__ndk1::__tree_node<std::__ndk1::__value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>, void*>*, long>, bool> std::__ndk1::__tree<std::__ndk1::__value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>, std::__ndk1::__map_value_compare<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::__value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>, std::__ndk1::less<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>, true>, std::__ndk1::allocator<std::__ndk1::__value_type<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>>>>>::__emplace_unique_impl<char const* const&, char const* const&>(char const* const&, char const* const&)) (BuildId: 64cfebf5b574b6729ebc51799aa94ccc3238cbcc)
  #02  pc 0x0000000000462f08  /data/app/~~m0kqybFNfeqnDenQFc53XQ==/org.dolphinemu.dolphinemu-Mtaw0lU8DVUQbte2ZjBp3w==/lib/arm64/libmain.so (Common::Log::LogManager::GetLogTypes()) (BuildId: 64cfebf5b574b6729ebc51799aa94ccc3238cbcc)
  #03  pc 0x000000000044339c  /data/app/~~m0kqybFNfeqnDenQFc53XQ==/org.dolphinemu.dolphinemu-Mtaw0lU8DVUQbte2ZjBp3w==/lib/arm64/libmain.so (Java_org_dolphinemu_dolphinemu_NativeLibrary_GetLogTypeNames+56) (BuildId: 64cfebf5b574b6729ebc51799aa94ccc3238cbcc)
  #04  pc 0x000000000031456c  /data/misc/apexdata/com.android.art/dalvik-cache/arm64/boot.oat (art_jni_trampoline+108)
  #05  pc 0x0000000000781508  /apex/com.android.art/lib64/libart.so (nterp_helper+152)
  #06  pc 0x00000000002d94d4  /data/app/~~m0kqybFNfeqnDenQFc53XQ==/org.dolphinemu.dolphinemu-Mtaw0lU8DVUQbte2ZjBp3w==/base.apk (org.dolphinemu.dolphinemu.features.settings.ui.SettingsFragmentPresenter.<clinit>+16)
[...]
2025-04-28 21:37:03 +02:00
26ae66297d GameINI: Disable Dual Core for NERF N-Strike 2025-04-28 13:11:50 -05:00
c32ca0696e FifoPlayer: Make functions static 2025-04-28 20:09:14 +02:00
bad78cfed4 Core, VideoCommon: Fix crash at shutdown due to destructor ordering
Previously, PerformanceTracker registered a callback to be updated on
emulation state changes. PerformanceTrackers live in a global variable
(g_perf_metrics) within libvideocommon. The callback was stored in a
global variable in libcore. This created a race condition at shutdown
between these libraries, when the PerfTracker's destructor tried to
unregister the callback.
Notify the PerfTracker directly from libcore, without callbacks, since
Core.cpp already references g_perf_metrics explicitly. Also rename
Core::CallOnStateChangedCallbacks to NotifyStateChanged to better
reflect what it's doing.
2025-04-28 07:11:53 +03:00
4ec2072beb Core: Use MoveOnlyFunction for RunOnCPUThread. 2025-04-27 20:07:13 -05:00
37aa65afc4 VideoCommon: Use MoveOnlyFunction for AsyncRequests. 2025-04-27 20:07:13 -05:00
e403dee3da Common: Add MoveOnlyFunction. 2025-04-27 20:07:13 -05:00
97e696e524 CMake: Explicitely link udev if LIBUDEV_FOUND is set 2025-04-27 22:03:15 +02:00
2e6e7eddd1 DVDThread: Implement with WorkQueueThread and WaitableSPSCQueue. 2025-04-27 04:16:27 -05:00
891833d1a1 Externals: Update zstd from 1.4.4 to 1.5.7 and convert to submodule 2025-04-26 22:07:59 +02:00
552b6da9c4 Hide DirectoryBlob boot.bin files from game list
Extracted games contain a boot.bin file that contains the disc header.
These boot.bin files are considered valid volumes by Dolphin, since
Dolphin only checks the disc header to determine if something is a valid
GC/Wii disc. Running them doesn't make any sense, though.

boot.bin files used to not be scanned by Dolphin due to their file
extension, but .bin was added to the list of file extensions to scan for
in 494e2c0. To stop them from showing up in the game list, let's update
the ShouldHideFromGameList mechanism.
2025-04-26 20:54:32 +02:00
8ee64a84c7 Merge pull request #13590 from tygyh/UCodes-Remove-redundant-qualifiers
UCodes: Remove redundant qualifiers
2025-04-26 16:23:27 +01:00
f060baa257 Config: Add locking for config changed callbacks
Different threads are adding and calling callbacks, so this should have
some locking. This is both to ensure thread safety when accessing
`s_callbacks` and to ensure that there won't be situations where a
callback gets called after it's removed.

`s_callback_guards` is also accessed from multiple threads and has
therefore been made atomic.
2025-04-26 12:56:37 +02:00
3ed3fb05af Android: Allow reporting start to analytics for non-main activity
a1691a4 made it so analytics start events can only be generated when
starting the main activity. However, some users launch Dolphin's
emulation activity from a separate frontend application, bypassing
Dolphin's main activity. This change adjusts the logic so that start
events can be generated if any activity is started after 6 hours of
inactivity. This more closely matches the behavior we had before
a1691a4, while still ensuring duplicate start events aren't generated.

I've also fixed the inconsistent indentation in ActivityTracker.kt.
2025-04-26 10:45:56 +02:00
741ffc3114 Merge pull request #13514 from LillyJadeKatrin/retroachievements-failed-load-bug
Call AchievementManager CloseGame on load failures
2025-04-26 10:36:09 +02:00
3e5286c1a4 Merge pull request #13593 from Dentomologist/mainwindow_fix_use_after_free_during_dolphin_shutdown
MainWindow: Fix use-after-free during Dolphin shutdown
2025-04-26 09:06:06 +02:00
3a883f28d6 Config: Add [[nodiscard]] to AddConfigChangedCallback
Require callers of Config::AddConfigChangedCallback and
CPUThreadConfigCallback::AddConfigChangedCallback to handle the returned
ConfigChangedCallbackIDs to hopefully prevent future issues with
callbacks getting called after their associated objects have been
destroyed.
2025-04-25 16:04:12 -07:00
45b9def42c VideoConfig: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
d0dc8ae5e1 FreeLook: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
9db4067957 UICommon: Merge ConfigChangedCallbacks
Use a single lambda as a callback which calls InitCustomPaths and
RefreshConfig instead of having separate callbacks for each of them.

This fixes the callback for InitCustomPaths not being removed on
shutdown; the callback for the lambda (previously for RefreshConfig) is
already removed in Shutdown().
2025-04-25 16:00:43 -07:00
8724daf44e Settings: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:19 -07:00
9c40a7976b AchievementManager: Remove ConfigChangedCallback on shutdown
Prevent SetHardcoreMode from being called after m_client is set to
nullptr. rc_client_set_hardcore_enabled() checks for nullptr so this
didn't cause any problems, but better not to rely on that.

Also prevents multiple SetHardcoreMode callbacks from piling up when
repeatedly toggling Config::RA_ENABLED.
2025-04-25 15:29:29 -07:00
e37a195192 MainWindow: Fix use-after-free during shutdown
Remove ConfigChangedCallback in MainWindow's destructor to prevent the
callback from accessing the destroyed MainWindow afterward.

After MainWindow is destroyed UICommon::Shutdown calls
LogManager::Shutdown which ultimately triggers any remaining callbacks.
This resulted in calling MainWindow::OnHardcoreChanged, which crashed in
debug builds and didn't have any obvious effect in release builds.
2025-04-25 15:29:29 -07:00
9868138c22 UCodes: Remove redundant qualifiers 2025-04-25 13:18:56 +02:00
066408326c Core/HW/EXI: Remove redundant inline specifiers 2025-04-25 12:03:52 +02:00
50ca32352f Core/HW/GCMemcard: Make variables constant 2025-04-25 11:35:59 +02:00
805307f432 Merge pull request #13451 from vyuuui/numeric_labels
Add numeric label support to assembler
2025-04-25 01:56:43 +01:00
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
a95779add0 Merge pull request #13506 from JosJuice/android-time-played
Android: Show time played in game details
2025-04-25 01:43:53 +01:00
5523b9a01b Merge pull request #13487 from Dentomologist/performancemetrics_fix_window_arrangement
PerformanceMetrics: Fix window arrangement
2025-04-25 01:40:58 +01:00
50026ab795 Merge pull request #13497 from hoogmin/modernize_fs_path
Core/Common/FileUtil.cpp: Use std path utility for automatic path separator handling.
2025-04-25 01:38:35 +01:00
a6290caa2e DSPHLE: set accelerator gain 2025-04-25 01:09:15 +01:00
80adfc606d docs/DSP: Rename SCALE to PRED_SCALE 2025-04-25 01:09:15 +01:00
8412a7c336 DSPAccelerator: update comment (NFC) 2025-04-25 01:09:15 +01:00
f0bacb826a DSPAccelerator: rename MMIOPCMHalt to MMIOPCMNoInc 2025-04-25 01:09:15 +01:00
7c7c179b44 DSP tests: update DSP MMIO labels 2025-04-25 00:51:46 +01:00
6c870860ea DSP tests: clean up unused code 2025-04-25 00:51:46 +01:00
05381c5b6d Address Pokechu22's feedback 2025-04-25 00:51:46 +01:00
21d5e3182d Fix DSP loop test init order, add DSP pcm test 2025-04-25 00:51:46 +01:00
cd77e682ca Name gain shift/scaling better 2025-04-25 00:51:46 +01:00
512da86b1a Update DSP docs with accelerator info, fix ANDC/ORC instruction description typos 2025-04-25 00:51:46 +01:00
c460cafecf Update ACDRAW/ACDSAMP reg names in DSPTables and DSPSpy tests 2025-04-25 00:51:46 +01:00
d517fe25f1 Add accelerator input MMIO register, fix MMIO PCM modes 2025-04-25 00:51:45 +01:00