Commit Graph

445 Commits

Author SHA1 Message Date
Tom Pratt
37e34af96a Implement DoAllPlayersHaveGame() check 2026-05-07 11:22:24 +02:00
Tom Pratt
c0e44478a0 Add network mode picker for host 2026-05-07 11:22:24 +02:00
Tom Pratt
5d54c161b7 Add host buffer settings for fair input delay mode
Also rename max buffer to client buffer for better consistency with settings and c++
2026-05-07 11:22:24 +02:00
Tom Pratt
f38f61a6a0 Handle traversal state changes and errors
Traversal connections show in the joining info UI.
Non fatal errors show the retry button.
Fatal errors end the netplay session.
2026-05-07 11:22:24 +02:00
Tom Pratt
4a52be0960 Show joining info for local and external IP addresses
Doesn't support traversal yet
2026-05-07 11:22:24 +02:00
Tom Pratt
39d17b2faf Add ability to choose game when hosting
Also fix bottom sheets so they survive rotation
2026-05-07 11:22:24 +02:00
Tom Pratt
fa5facfdfb Create NetPlayServer and start game 2026-05-07 11:22:24 +02:00
Tom Pratt
7ea7e638bd Implement OnMsgPowerButton 2026-05-07 11:22:24 +02:00
Tom Pratt
2c82e5188e Game digest progress dialog
We just about get away with using a StateFlow in NetplaySession since the host sends AbortGameDigest when closing their own dialog. Without that it would be harder for the UI to distinguish between subsequent dialogs. If that wasn't the case then NetplaySession might need to expose the individual progress and result updates and have the view model assemble it into the overall GameDigestProgress.
2026-05-07 11:22:24 +02:00
Tom Pratt
8792a4b924 Handle desync messages
Show them in the chat window and also in a toast during game play.
2026-05-07 11:22:24 +02:00
Tom Pratt
1285cb2282 Make NetplaySession not a singleton
Create a new NetplaySession each time we try to join a netplay game. Hold onto it in NetplayManager so its available to the different activities that need to access it. Close the session when backing out of the netplay UI. Some guardrails in case things go out of sync: creating a session closes the old one if it is still around for some reason, finalizer in NetplaySession to release native resources if not closed explicitly for some reason. Profiling done to ensure all kotlin and native objects are successfully cleared / garbage collected.
2026-05-07 11:22:23 +02:00
Tom Pratt
371fa1a250 Use existing settings API instead of custom jni calls 2026-05-07 10:39:50 +02:00
Tom Pratt
3572afcbbf Show save transfer progress
When transferring saves from the host. Equivalent of ChunkedProgressDialog in QT.
2026-05-07 10:39:50 +02:00
Tom Pratt
05cfd16665 Release boot session data during Netplay cleanup
Boot session data is already handled when the game is booted so this is just fallback in case the game launch fails in some weird way.

Add missing @Keep annotations to functions called from C++
2026-05-07 10:39:50 +02:00
Tom Pratt
ee1271e5b2 Implement OnConnectionLost, show a dialog on the main netplay screen forcing the user to exit 2026-05-07 10:39:49 +02:00
Tom Pratt
b21cbc63f7 Implement StopGame callback and use it to finish the emulation activity 2026-05-07 10:39:49 +02:00
Tom Pratt
fd21ca13ff Settings refactor
Remove the big saveSetup function and set individual settings immediately after being changed in the UI. Group them all under Netplay.Settings
2026-05-07 10:39:49 +02:00
Tom Pratt
a87d315283 Max buffer 2026-05-07 10:39:49 +02:00
Tom Pratt
a5bd27d731 Implement more NetPlayUICallbacks
Includes chat, game changes, pad buffer changes and host input authority. Merges them all into the chat window.
2026-05-07 10:39:48 +02:00
Tom Pratt
97279f24dd Implement player list 2026-05-07 10:39:48 +02:00
Tom Pratt
b2e900ce40 Show client connection errors and handle connection result
If result is a success sent event to launch the next netplay screen. if it fails, clear up the netplay client
2026-05-07 10:39:47 +02:00
Tom Pratt
12343ebf86 Store netplay BootSessionData and use it to run the netplay game 2026-05-07 10:39:47 +02:00
Tom Pratt
01c8c4aee2 Pass game list to NetPlayUICallbacks and implement OnMsgChangeGame, OnMsgStartGame, FindGameFile 2026-05-07 10:39:47 +02:00
Tom Pratt
2839a5d11b Add NetPlayClient join and stub NetPlayUICallbacks 2026-05-07 10:39:47 +02:00
Tom Pratt
00941050c7 Add Netplay settings JNI layer and wire up NetplaySetupViewModel 2026-05-07 10:39:47 +02:00
JosJuice
c73dde2193 Android: Remove HostThreadLock
Follow-up to 068947e. HostThreadLock no longer serves a purpose.
2026-04-29 18:55:18 +02:00
JosJuice
cc01a60347 GCAdapter: Automatically start and stop thread
This keeps the logic encapsulated inside GCAdapter.cpp so callers don't
have to think about it.
2026-04-18 19:40:25 +02:00
Tillmann Karras
f06aef4f83 Improve NAND import progress dialog
Now with cancel button and an actual progress bar. For simplicity, we do
two passes on the progress bar, one for loading the NAND into memory and
one for extracting it. The user directory is likely on an SSD, making
the extraction pass invisibly fast.
2026-04-04 22:02:45 +01:00
Simonx22
d2e381090c DolphinQt: Improve Gecko code download failure message 2026-03-03 11:09:39 -05:00
JosJuice
5440c7737f Explicitly transfer control of SYSCONF to emulated system
The functions SaveToSYSCONF and LoadFromSYSCONF contain checks for
whether emulation is running. The intent of this is that when we're
emulating a Wii, the emulated system may write to SYSCONF whenever it
likes and does not expect anything else to write to SYSCONF, so the
host code shouldn't access SYSCONF while emulation is ongoing. However,
Core::IsRunning is an imperfect proxy for whether we've handed over
control of SYSCONF to the emulated system yet, as the actual handover
happens at a slightly different point in time than when the emulation
state is changed. This usually isn't a problem, but in theory it could
be a determinism problem if a setting is changed right as emulation is
starting, or it could cause the emulated software to briefly misbehave
if a setting is changed right as emulation is stopping.

Things got worse in 72cf2bdb87 when I
replaced the Core::IsRunning calls with !Core::IsUninitialized. With
IsRunning, there was be a period of time where SYSCONF should have been
protected but wasn't. With !IsUninitialized, there was a period of time
where SYSCONF shouldn't have been protected but was, and crucially, this
period of time included the moments where we do setup and teardown of
the emulated NAND, which broke transferring SYSCONF settings between the
host and the guest. 72cf2bdb87 was
reverted because of this.

This commit adds a flag that we explicitly flip when control is handed
over to or from the emulated system. This protects the SYSCONF file
for exactly as long as is needed.
2026-02-14 10:05:27 +01:00
Jordan Woyak
dd2b94cd4a
Merge pull request #13594 from jordan-woyak/state-cleanups
State: Simplify interthread communication and general cleanups.
2026-02-03 16:50:52 -06:00
Sintendo
60ca0626df Remove VectorToJStringArray 2026-01-24 16:50:10 +01:00
Sintendo
f2e1c71803 Common/FileSearch: Refactor DoFileSearch 2026-01-24 16:50:10 +01:00
Jordan Woyak
2322437f96 State: Simplify interthread communication and cleanups. Save/Load calls are now always non-blocking for the caller, but appropriately block the CPU thread as needed. 2026-01-19 21:56:59 -06:00
JosJuice
0ba32f7add Android: Detect when native code should flush unsaved data 2026-01-19 21:56:09 -06:00
Joshua Vandaële
55f0715ad4
c++23: Replace Common::ToUnderlying with std::to_underlying
Requires at least GCC 11, Clang 13, MSVC 19.30 (VS2022 17.0), or AppleClang 13.1.6 (XCode 13.3).
2026-01-09 23:49:10 +01:00
JosJuice
f4f7424a9f
Merge pull request #13583 from LillyJadeKatrin/retroachievements-android
Android Support for RetroAchievements
2025-11-22 17:00:03 +01:00
LillyJadeKatrin
ddced1a070 RetroAchievements - Android login callback
Modify the RetroAchievements login code in Android to pass in a callback, pop a message if login fails, close the login box if it succeeds.
2025-11-18 20:40:15 -05:00
JosJuice
f966c55e0c
Merge pull request #14097 from Simonx22/android/network-helper-kotlin
Android: Convert NetworkHelper to Kotlin
2025-11-17 20:28:20 +01:00
LillyJadeKatrin
1e0f6a557e Android Achievements - Hardcore disables
Disables state loading and emulation speeds below 100% when RetroAchievements hardcore mode is enabled.
2025-11-16 22:05:54 -05:00
LillyJadeKatrin
f4f26a26d2 Add login to achievement settings 2025-11-16 22:05:54 -05:00
LillyJadeKatrin
b662cd93ce Add Achievements submenu to Android settings 2025-11-16 22:05:53 -05:00
JosJuice
b6e062f2e3
Merge pull request #13689 from JosJuice/lock-core-any-thread
Core: Let any thread call previously host-thread-only functions
2025-11-16 18:35:17 +01:00
JosJuice
41ab5c0ead Android: Ship Sys/Resources/
We were previously excluding this folder from Android builds because it
didn't contain any files that were used on Android. However, we now have
an OSD font file that we do want to use on Android, and there's also a
few PNG files that will be needed by the RetroAchievements integration.

In terms of file size, this is what gets added:

OSD font: 48.1 KiB
RetroAchievements graphics: 3.5 KiB
Unused graphics: 116.8 KiB

We're still excluding Sys/Themes/, which is 1.1 MiB and entirely unused.
2025-11-16 15:33:22 +01:00
Simonx22
cdc21490e4 Android: Convert NetworkHelper to Kotlin 2025-11-11 15:58:07 -05:00
JosJuice
068947e2b6 Core: Remove IsHostThread
The core no longer cares which thread is the host thread.

Cleaning up Android's HostThreadLock is left for another PR, in part
because the HostThreadLock in NativeConfig.cpp still serves a purpose,
and in part to make any issues easier to bisect.
2025-11-10 21:14:56 +01:00
LillyJadeKatrin
cff0ba76c1 Init achievement manager in Android startup 2025-11-08 20:31:23 -05:00
OatmealDome
4f849ec827
Merge pull request #14047 from Simonx22/reset-all-dolphin-settings-android
Android: Add Reset Dolphin Settings functionality
2025-11-08 14:03:44 -05:00
OatmealDome
02ad041866
Merge pull request #14086 from Simonx22/android/use-native-analytics
Android: Use the shared HTTP analytics backend
2025-11-08 14:03:06 -05:00
Simonx22
82f658a28f Android: Use the shared HTTP analytics backend
We can now route Android analytics through Common::HttpAnalyticsBackend, drop the Volley sender, and keep the JNI layer limited to only transfer metadata since https://bugs.dolphin-emu.org/issues/11772 has been fixed.
2025-11-08 12:14:40 -05:00