Commit Graph

43723 Commits

Author SHA1 Message Date
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
14fadbbe56 ADPCM mode doesn't entirely die with larger accesses, gain is PCM only 2025-04-25 00:51:45 +01:00
c7d8afc5a7 Use correct exceptions for d3 reads/writes 2025-04-25 00:51:45 +01:00
c9bb258e88 Add accelerator raw d3 test 2025-04-25 00:51:45 +01:00
0dd282f626 Fix DSPAcceleratorTest 2025-04-25 00:51:45 +01:00
ac2fdefcb4 Refactor accelerator format as a bitfield, use gain/yn1/yn2 in PCM mode 2025-04-25 00:51:45 +01:00
04c7c1a4a1 Rename accelerator accesses to 'raw' and 'sample' 2025-04-25 00:51:45 +01:00
256d9f8702 Improve ReadD3 emulation 2025-04-25 00:51:45 +01:00
bbc11edd7d Rework WriteD3 based on hardware testing 2025-04-25 00:51:45 +01:00