Commit Graph

37210 Commits

Author SHA1 Message Date
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
e8b63fe090 UnitTests: Add tests for WorkQueueThread. 2025-04-30 14:31:51 -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
JosJuice
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
Dr. Dystopia
c32ca0696e FifoPlayer: Make functions static 2025-04-28 20:09:14 +02: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
Jordan Woyak
4ec2072beb Core: Use MoveOnlyFunction for RunOnCPUThread. 2025-04-27 20:07:13 -05:00
Jordan Woyak
37aa65afc4 VideoCommon: Use MoveOnlyFunction for AsyncRequests. 2025-04-27 20:07:13 -05:00
Jordan Woyak
e403dee3da Common: Add MoveOnlyFunction. 2025-04-27 20:07:13 -05: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
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
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
Dr. Dystopia
066408326c Core/HW/EXI: Remove redundant inline specifiers 2025-04-25 12:03:52 +02:00
Dr. Dystopia
50ca32352f Core/HW/GCMemcard: Make variables constant 2025-04-25 11:35:59 +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
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
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
Tillmann Karras
a6290caa2e DSPHLE: set accelerator gain 2025-04-25 01:09:15 +01:00
Tillmann Karras
8412a7c336 DSPAccelerator: update comment (NFC) 2025-04-25 01:09:15 +01:00
Tillmann Karras
f0bacb826a DSPAccelerator: rename MMIOPCMHalt to MMIOPCMNoInc 2025-04-25 01:09:15 +01:00
Tillmann Karras
7c7c179b44 DSP tests: update DSP MMIO labels 2025-04-25 00:51:46 +01:00
Tillmann Karras
6c870860ea DSP tests: clean up unused code 2025-04-25 00:51:46 +01:00
Tillmann Karras
05381c5b6d Address Pokechu22's feedback 2025-04-25 00:51:46 +01:00
xperia64
21d5e3182d Fix DSP loop test init order, add DSP pcm test 2025-04-25 00:51:46 +01:00
xperia64
cd77e682ca Name gain shift/scaling better 2025-04-25 00:51:46 +01:00
xperia64
c460cafecf Update ACDRAW/ACDSAMP reg names in DSPTables and DSPSpy tests 2025-04-25 00:51:46 +01:00
xperia64
d517fe25f1 Add accelerator input MMIO register, fix MMIO PCM modes 2025-04-25 00:51:45 +01:00
xperia64
14fadbbe56 ADPCM mode doesn't entirely die with larger accesses, gain is PCM only 2025-04-25 00:51:45 +01:00
xperia64
c7d8afc5a7 Use correct exceptions for d3 reads/writes 2025-04-25 00:51:45 +01:00
xperia64
c9bb258e88 Add accelerator raw d3 test 2025-04-25 00:51:45 +01:00
xperia64
0dd282f626 Fix DSPAcceleratorTest 2025-04-25 00:51:45 +01:00
xperia64
ac2fdefcb4 Refactor accelerator format as a bitfield, use gain/yn1/yn2 in PCM mode 2025-04-25 00:51:45 +01:00
xperia64
04c7c1a4a1 Rename accelerator accesses to 'raw' and 'sample' 2025-04-25 00:51:45 +01:00
xperia64
256d9f8702 Improve ReadD3 emulation 2025-04-25 00:51:45 +01:00
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
Jordan Woyak
6c751fb722
Merge pull request #13570 from SuperSamus/advanced-panel-unused
DolphinQt: Remove unused variables from `AdvancedPane.h`
2025-04-23 13:30:39 -05: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
JosJuice
c44418a4d9
Merge pull request #13561 from JosJuice/android-renumbered-platforms
Android: Update platform enum values
2025-04-23 17:08:50 +02:00
Dr. Dystopia
fe657b9759 DolphinTool: Make parameter constant 2025-04-23 15:55:48 +02:00
Dr. Dystopia
d5314cbf48 UnitTests: Remove redundant virtual specifier 2025-04-23 14:33:14 +02:00
Dr. Dystopia
9926a9bd7f VertexLoaderTest: Replace std::tie with structured bindings 2025-04-23 13:11:17 +02:00
Dr. Dystopia
947bdea590 UnitTests: Use constexpr 2025-04-23 12:45:08 +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
Joshua Vandaële
d9d0082018
linter: Bump clang-format version to 19.1 2025-04-23 11:15:52 +02:00
Dr. Dystopia
6e6736c89f UnitTests: Rename lambda parameters which hide previous declarations 2025-04-23 08:15:10 +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
JosJuice
25fdde4204 Android: Update platform enum values
71f654c added a new platform in the middle of the C++ platform enum
without updating the corresponding Android code, making the Android code
incorrectly treat Wii discs as WAD files, WAD files as DOL/ELF files,
and so on. This commit fixes the problem.

To be able to add the new Triforce entry into the Platform enum without
it leading to the UI getting an additional tab, I'm splitting the enum
into Platform and PlatformTab. Platform now exactly matches the C++
enum (previously it excluded ELFOrDOL), and PlatformTab has the same
content as the old Platform.
2025-04-22 20:07:15 +02: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
Dr. Dystopia
71249dec33 Android: Apply style alignment refactorings 2025-04-22 13:34:21 +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
JMC47
41408076e3
Merge pull request #13520 from shuffle2/android-start
Prevent android generating duplicate analytics events
2025-04-20 20:17:30 -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
Shawn Hoffman
a1691a4031 Prevent android generating duplicate analytics events
dolphin-start event was being generated twice for the normal
end-user case, as can be seen in analytics data for some years.
The problem occured when:
* Android reaped the process hosting the dolphin activity
  (e.g. for power/memory saving).
and
* Dolphin activity was in "stopped" state for > 6 hours before
  being switched back to.

Under above conditions, both calls to ReportStartToAnalytics
would be performed, as dolphin thought it was being launched anew,
and also thought it had been asleep for > 6 hours.

fixes https://bugs.dolphin-emu.org/issues/13675
2025-04-19 22:16:01 -07: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
b8e70df413 Android: Show time played in game details
Unlike in DolphinQt, there isn't much space to show playtimes directly in
the game list, so I've put it in the game details dialog instead.
2025-04-19 14:34:49 +02:00
JosJuice
3eee52cb6b Android: Create toggle for enabling/disabling time tracking 2025-04-19 14:29:49 +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