Commit Graph

2595 Commits

Author SHA1 Message Date
Tom Pratt
fb03278049 Update compose dependencies
Was using 2025 instead of 2026! Fixed some buggy bottom sheet behaviour.

Minor tidying of the chat UI in the bottom sheet
2026-05-07 16:35:18 +02:00
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
309090520e Send own messages to chat
A player's own messages don't come back via the server.
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
ccce2b2e9a Hosting UI 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
ab6c2d0d56 Dont try to load temporary save states when launching netplay
An orientation change can trigger this code path immediately when a game starts. e.g. dolphin is portrait when launching the game but settings force gameplay to landscape. We want to avoid this and continue to the netplay launch code below.

If the user backgrounds dolphin during netplay and then resumes after the process has died it will actually resume from the save state in single player mode, not sure if thats good or bad but fine for now.

Netplay doesnt handle rotation very well, seems to go more and more out of sync the more rotations.
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
64fd5de16b Put players table in an OutlinedBox, makes the UI look more consistent. 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
d82a9242a1 Netplay chat UI 2026-05-07 10:39:48 +02:00
Tom Pratt
97279f24dd Implement player list 2026-05-07 10:39:48 +02:00
Tom Pratt
bfa68bf935 Reorder netplay class
Put all the boring settings at the bottom to reduce scrolling!
2026-05-07 10:39:48 +02:00
Tom Pratt
099243f2c6 Add mostly empty Netplay screen, equivalent of NetPlayDialog in QT.
All it can do at this point is quit the current netplay session when backing out of this screen.
2026-05-07 10:39:48 +02:00
Tom Pratt
43d592c912 Move NetplaySetupScreen to its own file 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
Tom Pratt
23f5f02c11 Netplay setup UI
Only for connecting, no hosting yet.
2026-05-07 10:39:46 +02:00
Tom Pratt
ec8253ebff Add compose dependencies for Android and empty NetplaySetupActivity
Derive compose colour theming from the existing XML styles already set at the activity level.
2026-05-07 10:39:46 +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
OatmealDome
af15769d57
Merge pull request #14569 from Simonx22/android/convert-gamefilecachemanager-to-kotlin
Android: Convert GameFileCacheManager to Kotlin
2026-04-26 12:03:57 -04:00
Dentomologist
a94854309b
Merge pull request #14608 from JosJuice/gcadapter-auto-start
GCAdapter: Automatically start and stop thread
2026-04-24 19:51:51 -07: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
JosJuice
4aaecbb148 Android: Add page table fastmem to Debug settings 2026-04-18 08:42:34 +02:00
OatmealDome
0cdb855434
Merge pull request #14567 from Simonx22/android/convert-wiimoteadapter-to-kotlin
Android: Convert WiimoteAdapter to Kotlin
2026-04-16 20:25:19 -04:00
Simonx22
301ca5fcb8 Android: Convert GameFileCacheManager to Kotlin 2026-04-16 16:46:24 -04:00
Simonx22
e982aeacad Android: Convert GCAdapter to Kotlin 2026-04-06 19:56:27 -04:00
Simonx22
662b1d74a8 Android: Convert WiimoteAdapter to Kotlin 2026-04-06 18:21:07 -04:00
Jordan Woyak
d3275b9ffe
Merge pull request #14490 from Simonx22/android/convert-gamepropertiesdialog-to-kotlin
Android: Convert GamePropertiesDialog to Kotlin
2026-04-05 18:41:12 -05:00
Jordan Woyak
3bc6815c8b
Merge pull request #14503 from Simonx22/android/convert-syncprogramsjobservice-to-kotlin
Android: Convert SyncProgramsJobService to Kotlin
2026-04-05 18:37:57 -05: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
Jordan Woyak
26583fd026 HW/GBACore: Remove the GBA "Threads" setting. Make GBAs always run on dedicated threads in preparation for future improvements. 2026-04-02 18:11:29 -05:00
JosJuice
5167adc8df Android: Add GBA settings
The following settings were excluded:

* Port 1-4 ROM: We're only supporting Game Boy Player for now
* Save in Same Directory as the ROM: Implementation nightmare due to SAF
2026-03-31 23:40:54 -05:00