21 Commits
Author SHA1 Message Date
Tom PrattandTom Pratt 1d1c9696ae lint formatting 2026-05-19 12:03:02 +02:00
Tom PrattandTom Pratt 06cc09cf09 Pass immutable games list to NetplayUICallbacks
Remove corresponding jni config.

Rename Netplay to NetplaySession in jni config to match new kotlin name.
2026-05-19 12:03:02 +02:00
Tom PrattandTom Pratt f63b81dd39 Use unique_ptr when creating netplay client / server 2026-05-19 12:03:01 +02:00
Tom PrattandTom Pratt 1bc64a0e6e Fix netplay license headers 2026-05-19 12:03:01 +02:00
Tom PrattandTom Pratt 4c0bf2944b Implement DoAllPlayersHaveGame() check 2026-05-19 12:03:01 +02:00
Tom PrattandTom Pratt 76ae445694 Add network mode picker for host 2026-05-19 12:03:00 +02:00
Tom PrattandTom Pratt 1c2806dfe9 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-19 12:03:00 +02:00
Tom PrattandTom Pratt 86de5ef4b0 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-19 12:03:00 +02:00
Tom PrattandTom Pratt 86a0f22887 Show joining info for local and external IP addresses
Doesn't support traversal yet
2026-05-19 12:03:00 +02:00
Tom PrattandTom Pratt 6655672ee3 Add ability to choose game when hosting
Also fix bottom sheets so they survive rotation
2026-05-19 12:02:59 +02:00
Tom PrattandTom Pratt 77f08364db Create NetPlayServer and start game 2026-05-19 12:02:59 +02:00
Tom PrattandTom Pratt abd324e98d 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-19 12:02:58 +02:00
Tom PrattandTom Pratt 183d6d778c Use existing settings API instead of custom jni calls 2026-05-19 12:02:58 +02:00
Tom PrattandTom Pratt b52ffa3e8b 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-19 12:02:57 +02:00
Tom PrattandTom Pratt 86956b21be 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-19 12:02:56 +02:00
Tom PrattandTom Pratt 65e4c60158 Max buffer 2026-05-19 12:02:56 +02:00
Tom PrattandTom Pratt c32732714e Implement more NetPlayUICallbacks
Includes chat, game changes, pad buffer changes and host input authority. Merges them all into the chat window.
2026-05-19 12:02:55 +02:00
Tom PrattandTom Pratt f52ca02ca2 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-19 12:02:54 +02:00
Tom PrattandTom Pratt 766374434c Pass game list to NetPlayUICallbacks and implement OnMsgChangeGame, OnMsgStartGame, FindGameFile 2026-05-19 12:02:54 +02:00
Tom PrattandTom Pratt 1464fdfc28 Add NetPlayClient join and stub NetPlayUICallbacks 2026-05-19 12:02:54 +02:00
Tom PrattandTom Pratt a1983e5fa2 Add Netplay settings JNI layer and wire up NetplaySetupViewModel 2026-05-19 12:02:54 +02:00