mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-09-29 13:46:55 -05:00
Pass immutable games list to NetplayUICallbacks
Remove corresponding jni config. Rename Netplay to NetplaySession in jni config to match new kotlin name.
This commit is contained in:
@@ -30,17 +30,23 @@ import org.dolphinemu.dolphinemu.features.netplay.model.SaveTransferProgress
|
||||
import org.dolphinemu.dolphinemu.features.netplay.model.TraversalState
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting
|
||||
import org.dolphinemu.dolphinemu.model.GameFile
|
||||
import org.dolphinemu.dolphinemu.services.GameFileCacheManager
|
||||
|
||||
class NetplaySession(
|
||||
private val onClosed: (NetplaySession) -> Unit,
|
||||
) {
|
||||
|
||||
private var netPlayUICallbacksPointer: Long = nativeCreateUICallbacks()
|
||||
@Keep
|
||||
private var netPlayUICallbacksPointer: Long =
|
||||
nativeCreateUICallbacks(GameFileCacheManager.getGameFiles().value ?: emptyArray())
|
||||
|
||||
@Keep
|
||||
private var netPlayClientPointer: Long = 0
|
||||
|
||||
@Keep
|
||||
private var netPlayServerPointer: Long = 0
|
||||
|
||||
@Keep
|
||||
private var bootSessionDataPointer: Long = 0
|
||||
|
||||
private val sessionScope = CoroutineScope(SupervisorJob())
|
||||
@@ -238,7 +244,7 @@ class NetplaySession(
|
||||
|
||||
// JNI methods
|
||||
|
||||
private external fun nativeCreateUICallbacks(): Long
|
||||
private external fun nativeCreateUICallbacks(gameFiles: Array<GameFile>): Long
|
||||
|
||||
private external fun nativeJoin(): Long
|
||||
|
||||
|
||||
Reference in New Issue
Block a user