Commit Graph

33372 Commits

Author SHA1 Message Date
Stavros Kosmas
c3fddce467
Merge d09436cd1a into 3564a256bf 2026-03-17 15:48:34 -04:00
JosJuice
3564a256bf
Merge pull request #14478 from JosJuice/wii-menu-headache
Move achievements code out of DVDInterface::SetDisc
2026-03-17 19:07:41 +01:00
Dentomologist
1ab9a867f6
Merge pull request #14396 from cscd98/fmt-fix
fmt: replace <fmt/base.h> with <fmt/format.h> as not available until fmt>=11
2026-03-17 10:34:00 -07:00
JosJuice
e123962bca Move achievements code out of DVDInterface::SetDisc
This should stop AchievementManager::LoadGame from being called for the
default ISO when CBoot::BootUp is booting something other than a disc or
IPL (most notably, the Wii Menu), while still detecting all disc changes
that happen while a disc game is running.
2026-03-17 09:07:34 +01:00
JosJuice
8ac767e032
Merge pull request #14474 from Dentomologist/fifoplayer_fix_screenshot_hang_during_playback
FifoPlayer: Fix hang when taking screenshot during FIFO log playback
2026-03-16 18:47:25 +01:00
Dentomologist
3e7ba69205 FifoPlayer: Fix hang when taking screenshot during FIFO log playback
Don't copy null terminators from the log's `header.gameid` into
`FifoDataFile`'s `m_game_id`.

Doing so would cause an infinite loop in `Core::GenerateScreenshotName`
as the various concatenations and `fmt::format` calls would then
effectively drop all the timestamps and disambiguating arbitrary numbers
since they followed the null terminator in the gameid, and so the
`File::Exists` calls would always return true.

Fixes https://bugs.dolphin-emu.org/issues/14002.
2026-03-16 00:49:38 -07:00
OatmealDome
4dc5ead172
Merge pull request #14469 from OatmealDome/backend-warning
GeneralWidget: Add protections against invalid values in BackendWarning()
2026-03-15 20:13:41 -04:00
OatmealDome
d60942d3cb
Merge pull request #14461 from Dentomologist/wasapistream_handle_getbuffer_errors
WASAPIStream: Fix crash when GetBuffer call fails
2026-03-15 20:09:28 -04:00
OatmealDome
aba842c09a
GeneralWidget: Add protections against invalid values in BackendWarning() 2026-03-15 14:08:41 -04:00
Craig Carnell
4caddbc12b fmt: change use of fmt/base.h to fmt/format.h as not provided until fmt>=11.0 2026-03-15 08:37:00 +00:00
Dentomologist
2aba231915 System: Use forward declarations in System.h 2026-03-14 10:53:45 -07:00
Mihai Brodschi
f9c3f06f0a Move PerformanceMetrics from global variable to System
This avoids the static initialization order fiasco between Core and VideoCommon

Co-authored-by: Jordan Woyak <jordan.woyak@gmail.com>
2026-03-14 16:42:21 +02:00
Dentomologist
e8a78ed95f WASAPIStream: Fix crash when GetBuffer call fails
Check the return value of calls to `GetBuffer` and stop the `WASAPI
handler` sound thread if they fail.

This prevents a crash due to a null pointer dereference if `GetBuffer`
is unable to retrieve a buffer, which could be triggered during
emulation by disabling the selected WASAPI output device in the Windows
Sound settings.
2026-03-13 20:29:58 -07:00
Dentomologist
7a45ede688
Merge pull request #14123 from JosJuice/fix-logical-page-mappings
Memmap: Fix populating m_logical_page_mappings
2026-03-13 12:11:01 -07:00
Jordan Woyak
51a15f42a9 HW/Triforce/SerialDevice: Add missing include to fix FreeBSD build. 2026-03-12 21:35:30 -05:00
JMC47
d4e97f6bd7
Merge pull request #14409 from sepalani/tri-rw-log
AMMediaboard: Improve recv/send log messages
2026-03-12 21:51:29 -04:00
JMC47
2336753a24
Merge pull request #14408 from sepalani/tri-eagain
AMMediaboard: Check for EAGAIN in WSAGetLastError
2026-03-12 21:51:10 -04:00
JMC47
f0096310bf
Merge pull request #14452 from jordan-woyak/triforce-avalon-touchscreen
Triforce: Implement The Key of Avalon's touchscreen.
2026-03-12 21:49:08 -04:00
Jordan Woyak
12d790a54a
Merge pull request #14442 from Dentomologist/performancemetrics_use_state_changed_hookableevent
PerformanceMetrics: Use HookableEvent for state changed callback
2026-03-12 19:54:13 -05:00
JMC47
9143c4cc95
Merge pull request #14172 from sepalani/usb-iso-ret
IOS/USB: Add helper to set return values of IsoMessage's packets
2026-03-12 16:33:07 -04:00
Dentomologist
e550e1ff7c
Merge pull request #14345 from TryTwo/cheat_search_work
CheatSearch: Add ability to breakpoint the selected lines.
2026-03-12 12:35:51 -07:00
Dentomologist
e26b61dcee
Merge pull request #14440 from JosJuice/optimize-remove-page
Core: Optimize RemoveHostPageTableMappings
2026-03-12 12:31:53 -07:00
JMC47
161f9e82c1
Merge pull request #14427 from Simonx22/qt/cheats-gecko-download-error-message
DolphinQt: Improve Gecko code download failure message
2026-03-12 15:25:41 -04:00
Jordan Woyak
cca880de16 State: Increase STATE_VERSION. 2026-03-12 03:58:01 -05:00
Jordan Woyak
3e8430440a Triforce: Implement The Key of Avalon's touchscreen.
Added SerialDevice base class interface.
Adapted MagneticCardReader to use the SerialDevice interface.
Implemented The Key of Avalon touchscreen SerialDevice.
Altered CSIDevice_AMBaseboard to use SerialDevice.
Made serial reads happen every GCAMCommand rather than only upon write.
2026-03-12 03:57:47 -05:00
Jordan Woyak
b77cf5e0f2 State: Increase STATE_VERSION. 2026-03-12 02:48:31 -05:00
Jordan Woyak
b1000496a2 SI_DeviceAMBaseboard: Clean up RunBuffer.
Eliminated outer loop.
Reduced memcpy'ing.
2026-03-12 02:48:07 -05:00
Jordan Woyak
4fa93e402d SI/SI_DeviceAMBaseboard: Expose the buffer size of 128 to eliminate some magic numbers. 2026-03-12 02:48:07 -05:00
Jordan Woyak
1234a4e479 SI_DeviceAMBaseboard: Use CreateStatusResponse to fix "RunSIBuffer: expected_response_length" WARN_LOGs. 2026-03-12 02:48:07 -05:00
Jordan Woyak
8da0a94ab9 SI_DeviceAMBaseboard: Add baseboard 0x70 command to SerialInterface::EBufferCommands enum to eliminate BaseBoardCommand enum. 2026-03-12 02:48:07 -05:00
Jordan Woyak
cda384d40f SI_DeviceAMBaseboard: Remove unnecessary code. 2026-03-12 02:48:07 -05:00
Jordan Woyak
fe2d604060
Merge pull request #14401 from naari3/master
AMMediaboard: stub Triforce NETWORK TEST command handling
2026-03-12 02:47:37 -05:00
Stavros Kosmas
d09436cd1a DolphinQt: Improve TAS UI Widgets
Made Stick and IR Widgets bigger
Improved Stick and IR layouts to better utilize space
Made Stick and IR Widgets Scale at a fixed ratio when window is resized
Added Scrollbars to Stick and IR Widgets
Reduced Spinbox padding in dark style
2026-03-12 04:59:49 +02:00
Dentomologist
252ec7452c PerformanceMetrics: Use HookableEvent for state changed callback
Use the normal state changed `HookableEvent` instead of having
`Core::NotifyStateChanged` call `g_perf_metrics.OnEmulationStateChanged`
directly.

The direct call was added in bad78cfed4 to
avoid a crash. At the time state changed callbacks were stored in a
vector, and the crash was caused by `g_perf_metric`'s destructor trying
to remove the callback from the already-destroyed vector.

Later a97627e736 switched state changed
callbacks to use `HookableEvent`, which is specifically designed to
handle the case where a hook outlives its associated event.

Since the workaround is no longer necessary replace it with a standard
`EventHook`.
2026-03-07 12:50:59 -08:00
JosJuice
a3b37c041a Core: Optimize RemoveHostPageTableMappings
This switches from an O(log(N) * M) algorithm to an O(N * log(M))
algorithm. This is advantageous because N, the size of `mappings`, is
usually much smaller than M, the size of `m_page_table_mapped_entries`.

RemoveLargePageTableMapping already did something similar, so we can
even deduplicate some code between it and RemoveHostPageTableMappings.

Speeds up Rogue Squadron 3 by roughly 3% on my PC.
2026-03-07 12:56:36 +01:00
JosJuice
d25ef67d6f DolphinQt: Save when closing settings window
If Dolphin crashes, changes that have been made to settings are often
lost. This has been a minor annoyance for me when developing, but it has
become a much bigger issue recently due to the problem where Dolphin
freezes on shutdown for ROG Ally users.

Instead of saving the config when certain arbitrary settings are
changed, let's save the config when the user closes the settings window.
2026-03-04 22:26:25 +01:00
JMC47
43def54de2
Merge pull request #14435 from Simonx22/fix/metal-early-stop-shutdown
Metal: Always run endEncoding on command encoders
2026-03-03 12:25:16 -05:00
Simonx22
d2e381090c DolphinQt: Improve Gecko code download failure message 2026-03-03 11:09:39 -05:00
Simonx22
03bcd564c5 Metal: Always run endEncoding on command encoders
Fixes a macOS Metal crash when stopping immediately after boot starts.

m_upload_encoder and m_texture_upload_encoder could be dealloc'd during shutdown before endEncoding could be called, which causes a Metal assertion failure.

Co-authored-by: OatmealDome <julian@oatmealdome.me>
2026-03-03 09:49:42 -05:00
Dentomologist
edb576f4c0 VertexLoaderManager: Fix crash caused by invalid array base
Don't set cached array bases to invalid pointers. If a game tries to set
an invalid base just keep the old one, which might cause game problems
but won't crash the emulator.
2026-03-02 13:02:51 -08:00
Dentomologist
15f24c56e4
Merge pull request #14327 from Dentomologist/performancemetrics_fix_graph_size_and_spacing
PerformanceMetrics: Fix graph size and spacing
2026-03-02 11:01:37 -08:00
TellowKrinkle
80762e0575 DSU: Don't crash on bad hostname 2026-03-01 00:08:08 -06:00
JMC47
63fc9d7ca3
Merge pull request #14425 from JosJuice/android-wiimote-crash
Android: Fix Wii Remote connection crashes
2026-02-28 16:16:20 -05:00
JosJuice
5a914e5247 Android: Use DeleteLocalRef more in WiimoteAndroid
Doesn't matter a lot, but we're supposed to do this to be nice citizens.
2026-02-28 16:13:36 +01:00
JosJuice
faa861f1ab Android: Fix Wii Remote connection crashes
Users are reporting a crash at the point where WiimoteAndroid::IORead
tries to use m_java_wiimote_payload. This commit solves the problem by
making m_java_wiimote_payload a global reference.

The code for setting up m_java_wiimote_payload has also been moved to
the constructor just because that way it's impossible for it to run
twice. (If the code as written were to run a second time, the old global
reference would be leaked. ConnectInternal should only run once, so this
is just to be on the safe side.)

Fixes https://bugs.dolphin-emu.org/issues/13960.
2026-02-28 16:10:58 +01:00
JosJuice
1a08708a75
Merge pull request #14418 from LillyJadeKatrin/retroachievements-wii-menu
RetroAchievements - Close game on switch to null hash
2026-02-28 15:15:50 +01:00
Dentomologist
f898d75bf3
Merge pull request #14317 from JosJuice/jit-cache-macro-loop
Jit: Use RangeSet for physical_addresses
2026-02-26 19:25:29 -08:00
naari3
65f8c8f6cc AMMediaboard: derive TestHardware phase2 delay from tick rate
Use the existing system reference instead of Core::System::GetInstance(),
and calculate the phase 2 scheduling delay from GetTicksPerSecond()
instead of hardcoding 50000 ticks.
2026-02-26 00:49:24 +09:00
Lilly Jade Katrin
713d557d5e RetroAchievements - Close game on switch to null hash
Mistakenly thought the change media call would close the current
game if the new media failed to hash. This wasn't the case so
instead I'll close the current game myself. This fixes an issue
where a default ISO would immediately load achievements when
starting up the Wii menu.
2026-02-24 22:55:30 -05:00
JosJuice
7b372db559 DiscIO: Only allow alphanumeric ASCII in game IDs
We often use game IDs in paths, so we should try to make sure path
traversal is impossible in game IDs. Admittedly, doing any kind of real
attack using the six bytes available in game IDs is unrealistic, but no
game ID should contain non-alphanumeric or non-ASCII characters anyway.

Might also fix https://bugs.dolphin-emu.org/issues/13982 by skipping
converting between encodings for game IDs.
2026-02-24 21:36:02 +01:00