summaryrefslogtreecommitdiff
path: root/Source/Android/jni/AndroidCommon/IDCache.cpp
diff options
context:
space:
mode:
authorTom Pratt <tom.pratt@outlook.com>2026-04-29 14:31:25 +0200
committerTom Pratt <tompratt@squareup.com>2026-05-19 12:02:58 +0200
commit117d1d71acc6b85b6c67396bd2222fbee7f0ff05 (patch)
treeca21c19d02b49d6dd1fe9c62683a0689b92019e6 /Source/Android/jni/AndroidCommon/IDCache.cpp
parentabd324e98d735d836d8131cef91b58f3278bc6fa (diff)
Handle desync messages
Show them in the chat window and also in a toast during game play.
Diffstat (limited to 'Source/Android/jni/AndroidCommon/IDCache.cpp')
-rw-r--r--Source/Android/jni/AndroidCommon/IDCache.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/Android/jni/AndroidCommon/IDCache.cpp b/Source/Android/jni/AndroidCommon/IDCache.cpp
index 2bee9e2138..caf305fc9b 100644
--- a/Source/Android/jni/AndroidCommon/IDCache.cpp
+++ b/Source/Android/jni/AndroidCommon/IDCache.cpp
@@ -43,6 +43,7 @@ static jmethodID s_netplay_update;
static jmethodID s_netplay_on_show_chunked_progress_dialog;
static jmethodID s_netplay_on_set_chunked_progress;
static jmethodID s_netplay_on_hide_chunked_progress_dialog;
+static jmethodID s_netplay_on_desync;
static jclass s_netplay_player_class;
static jmethodID s_netplay_player_constructor;
@@ -327,6 +328,11 @@ jmethodID GetNetplayOnHideChunkedProgressDialog()
return s_netplay_on_hide_chunked_progress_dialog;
}
+jmethodID GetNetplayOnDesync()
+{
+ return s_netplay_on_desync;
+}
+
jclass GetNetplayPlayerClass()
{
return s_netplay_player_class;
@@ -766,6 +772,8 @@ JNIEXPORT jint JNI_OnLoad(JavaVM* vm, void* reserved)
env->GetMethodID(netplay_class, "onSetChunkedProgress", "(IJ)V");
s_netplay_on_hide_chunked_progress_dialog =
env->GetMethodID(netplay_class, "onHideChunkedProgressDialog", "()V");
+ s_netplay_on_desync =
+ env->GetMethodID(netplay_class, "onDesync", "(ILjava/lang/String;)V");
env->DeleteLocalRef(netplay_class);
const jclass netplay_player_class =