From 3ed91742080194630bac072f4dbc9bdbffc94049 Mon Sep 17 00:00:00 2001 From: Tom Pratt Date: Wed, 8 Apr 2026 15:20:19 +0100 Subject: Store netplay BootSessionData and use it to run the netplay game --- Source/Android/jni/AndroidCommon/IDCache.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'Source/Android/jni/AndroidCommon/IDCache.cpp') diff --git a/Source/Android/jni/AndroidCommon/IDCache.cpp b/Source/Android/jni/AndroidCommon/IDCache.cpp index 1cd6e257e6..9c41869f5b 100644 --- a/Source/Android/jni/AndroidCommon/IDCache.cpp +++ b/Source/Android/jni/AndroidCommon/IDCache.cpp @@ -30,7 +30,8 @@ static jfieldID s_game_file_cache_manager_instance; static jclass s_netplay_class; static jfieldID s_net_play_client_pointer; -static jmethodID s_netplay_on_msg_start_game; +static jfieldID s_netplay_boot_session_data_pointer; +static jmethodID s_netplay_on_boot_game; static jclass s_analytics_class; static jmethodID s_get_analytics_value; @@ -247,6 +248,16 @@ jfieldID GetNetPlayClientPointer() return s_net_play_client_pointer; } +jfieldID GetNetplayBootSessionDataPointer() +{ + return s_netplay_boot_session_data_pointer; +} + +jmethodID GetNetplayOnBootGame() +{ + return s_netplay_on_boot_game; +} + jclass GetPairClass() { return s_pair_class; @@ -655,6 +666,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved) env->FindClass("org/dolphinemu/dolphinemu/features/netplay/Netplay"); s_netplay_class = reinterpret_cast(env->NewGlobalRef(netplay_class)); s_net_play_client_pointer = env->GetStaticFieldID(netplay_class, "netPlayClientPointer", "J"); + s_netplay_boot_session_data_pointer = env->GetStaticFieldID(netplay_class, "bootSessionDataPointer", "J"); + s_netplay_on_boot_game = env->GetStaticMethodID(netplay_class, "onBootGame", "(Ljava/lang/String;J)V"); env->DeleteLocalRef(netplay_class); const jclass analytics_class = env->FindClass("org/dolphinemu/dolphinemu/utils/Analytics"); -- cgit v1.2.3