Implement OnConnectionLost, show a dialog on the main netplay screen forcing the user to exit

This commit is contained in:
Tom Pratt
2026-04-25 17:40:40 +02:00
committed by Tom Pratt
parent 38b5c7370c
commit b1b133b036
8 changed files with 51 additions and 3 deletions

View File

@@ -135,7 +135,12 @@ void NetPlayUICallbacks::OnHostInputAuthorityChanged(bool enabled)
}
void NetPlayUICallbacks::OnDesync(u32, const std::string&) {}
void NetPlayUICallbacks::OnConnectionLost() {}
void NetPlayUICallbacks::OnConnectionLost()
{
JNIEnv* env = IDCache::GetEnvForThread();
env->CallStaticVoidMethod(IDCache::GetNetplayClass(), IDCache::GetNetplayOnConnectionLost());
}
void NetPlayUICallbacks::OnConnectionError(const std::string& message)
{