Commit graph

32139 commits

Author SHA1 Message Date
Dentomologist
77744169be SDL: Check if touchpad exists before getting input
Verify a touchpad is present before polling it for input. Without this
check the Debug log is spammed with the message "error: Parameter
'touchpad' is invalid" if you have a controller without a touchpad.

One would think every touchpad supports at least 1 finger, but in case
there's some weird edge case check the finger count to be sure.
2025-05-02 17:21:42 -07:00
Jordan Woyak
63572f15fc
Merge pull request #13620 from JosJuice/logmanager-cleanup
LogManager: Stop using manual memory management
2025-05-02 15:24:34 -05:00
JosJuice
c8be819711 LogManager: Stop using manual memory management
This fixes a memory leak that would occur when the Android frontend
calls LogManager::Init more than once in order to reload settings.

Note that the log window listener is now owned by LogManager instead of
by the frontend, making it consistent with the other log listeners.
2025-05-02 21:14:32 +02:00
JosJuice
6515807685
Merge pull request #13278 from JoshuaVandaele/saves-import
Implement importing multiple saves from an export folder
2025-05-02 15:40:27 +02:00
JosJuice
b566e81644
Merge pull request #13596 from JosJuice/config-callback-locking
Config: Add locking for config changed callbacks
2025-05-02 08:49:22 +02:00
JosJuice
58d305f75c
Merge pull request #13616 from parona-source/musl-cstdint
UICommon: Include implicit header
2025-05-02 08:03:01 +02:00
JMC47
0066119e41
Merge pull request #13617 from OatmealDome/coretiming-include
CoreTiming: Add missing SystemTimers.h include
2025-05-01 21:33:22 -04:00
JMC47
da4f643b9f
Merge pull request #13611 from jordan-woyak/work-queue-thread-sp
Core and Vulkan: Change WorkQueueThread to WorkQueueThreadSP in a few places.
2025-05-01 21:32:16 -04:00
JMC47
757e6aba46
Merge pull request #13597 from JosJuice/hide-boot-bin
Hide DirectoryBlob boot.bin files from game list
2025-05-01 21:30:10 -04:00
JMC47
2b568566ac
Merge pull request #13535 from m-brodschi/mihaib/fix-shutdown-crash
Core, VideoCommon: Fix crash at shutdown due to destructor order
2025-05-01 21:29:02 -04:00
JMC47
539a3ed021
Merge pull request #13464 from jordan-woyak/dont-toggle-skip-frames
DolphinQt: Don't auto toggle GFX_HACK_SKIP_DUPLICATE_XFBS.
2025-05-01 21:28:13 -04:00
JMC47
7222779e21
Merge pull request #13448 from Dentomologist/fix_unresponsive_hotkeys_when_moving_overlay_during_framestep
DolphinQt: Fix unresponsive hotkeys when clicking overlay during a framestep
2025-05-01 21:27:30 -04:00
JMC47
1bd2570d97
Merge pull request #13239 from JosJuice/jitarm64-rlwimix-imm-mask
JitArm64: Use AArch64 imm masks in rlwimix slow case
2025-05-01 21:26:27 -04:00
OatmealDome
0bd7cc64c9 CoreTiming: Add missing SystemTimers.h include 2025-05-01 19:13:02 -04:00
Alfred Wingate
fbb54604b6
UICommon: Include implicit header
The header isn't implicitly included on musl.

Bug: https://bugs.gentoo.org/952952
Signed-off-by: Alfred Wingate <parona@protonmail.com>
2025-05-02 02:03:41 +03:00
Jordan Woyak
e4525ca7ee
Merge pull request #13499 from jordan-woyak/frame-pacing-better-math
CoreTiming: Cleanups to avoid drift from cumulative rounding errors.
2025-05-01 15:58:33 -05:00
JosJuice
0ce929220d
Merge pull request #13553 from tygyh/Core/PowerPC/JitArm64-Replace-zeroes-in-boolean-context-with-false
JitArm64: Replace zeroes in boolean context with `false`
2025-05-01 10:11:44 +02:00
Jordan Woyak
0987c03693
Merge pull request #13453 from tygyh/Use-underlying-method
DolphinQt/FIFO/FIFOAnalyzer: Use Common::ToUnderlying
2025-04-30 22:18:02 -05:00
Admiral H. Curtiss
2e20e24136
Merge pull request #13587 from jordan-woyak/manual-value
Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template.
2025-04-30 23:45:33 +02:00
Jordan Woyak
ec940e6a2e VideoBackends/Vulkan: Use WorkQueueThreadSP for swap commands. 2025-04-30 16:29:35 -05:00
Jordan Woyak
753fe5bed1 Core: Use WorkQueueThreadSP in NetKDRequestDevice. 2025-04-30 16:29:21 -05:00
Jordan Woyak
c14101534f Core: Use WorkQueueThreadSP in NetIPTopDevice. 2025-04-30 16:28:57 -05:00
Jordan Woyak
bdb4fd8376 Core: Use WorkQueueThreadSP in DVDThread. 2025-04-30 16:17:21 -05:00
Jordan Woyak
8e64a02a42
Merge pull request #13579 from jordan-woyak/work-queue-thread-cleanup
WorkQueueThread: Implement in terms of WaitableSPSCQueue. Add unit tests.
2025-04-30 16:10:28 -05:00
Jordan Woyak
43e4e8f182
Merge pull request #13581 from jordan-woyak/dvd-WorkQueueThread
DVDThread: Implement with WorkQueueThread and WaitableSPSCQueue.
2025-04-30 16:09:36 -05:00
Jordan Woyak
4899913446 Common: Move some duplicate container element construction logic into a ManuallyConstructedValue template. 2025-04-30 14:56:07 -05:00
Jordan Woyak
a149b9d62d WorkQueueThread: Cleanups. Implement in terms of WaitableSPSCQueue. Add single producer WorkQueueThreadSP. 2025-04-30 14:31:51 -05:00
OatmealDome
0b0151770a
Merge pull request #13436 from JoshuaVandaele/clang-format-19
Update clang-format to version 19
2025-04-30 01:17:31 -04:00
Mihai Brodschi
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
Joshua Vandaële
97e696e524
CMake: Explicitely link udev if LIBUDEV_FOUND is set 2025-04-27 22:03:15 +02:00
Jordan Woyak
2e6e7eddd1 DVDThread: Implement with WorkQueueThread and WaitableSPSCQueue. 2025-04-27 04:16:27 -05:00
JosJuice
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
Tilka
8ee64a84c7
Merge pull request #13590 from tygyh/UCodes-Remove-redundant-qualifiers
UCodes: Remove redundant qualifiers
2025-04-26 16:23:27 +01:00
JosJuice
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
JosJuice
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
Dentomologist
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
Dentomologist
45b9def42c VideoConfig: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
Dentomologist
d0dc8ae5e1 FreeLook: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:43 -07:00
Dentomologist
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
Dentomologist
8724daf44e Settings: Remove ConfigChangedCallback on shutdown 2025-04-25 16:00:19 -07:00
Dentomologist
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
Dentomologist
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
Dr. Dystopia
9868138c22 UCodes: Remove redundant qualifiers 2025-04-25 13:18:56 +02:00
Tilka
805307f432
Merge pull request #13451 from vyuuui/numeric_labels
Add numeric label support to assembler
2025-04-25 01:56:43 +01:00
Tilka
fe307a06c6
Merge pull request #13476 from jordan-woyak/sdl-header
InputCommon: Move SDL Device class into its own cpp/h files.
2025-04-25 01:49:52 +01:00
Tilka
5523b9a01b
Merge pull request #13487 from Dentomologist/performancemetrics_fix_window_arrangement
PerformanceMetrics: Fix window arrangement
2025-04-25 01:40:58 +01:00
Tilka
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
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