Commit Graph

10 Commits

Author SHA1 Message Date
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
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
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
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
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