Commit Graph

7 Commits

Author SHA1 Message Date
Tom Pratt
1d1c9696ae lint formatting 2026-05-19 12:03:02 +02:00
Tom Pratt
4d1e749977 WithSession helper function
Handles the repeated boiler plate of using a weak reference to NetplaySession from NetplayUICallbacks
2026-05-19 12:03:02 +02:00
Tom Pratt
1bc64a0e6e Fix netplay license headers 2026-05-19 12:03:01 +02:00
Tom 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 Pratt
38b5c7370c Implement StopGame callback and use it to finish the emulation activity 2026-05-19 12:02:56 +02:00
Tom Pratt
766374434c Pass game list to NetPlayUICallbacks and implement OnMsgChangeGame, OnMsgStartGame, FindGameFile 2026-05-19 12:02:54 +02:00
Tom Pratt
1464fdfc28 Add NetPlayClient join and stub NetPlayUICallbacks 2026-05-19 12:02:54 +02:00