1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Merge pull request #620 from sztupy/android_campaing_fix

Add support for the Android App to notify if the server has been closed
This commit is contained in:
Alexander Shishkin
2020-01-06 20:40:25 +03:00
committed by GitHub

View File

@@ -646,6 +646,14 @@ PlayerColor CClient::getLocalPlayer() const
} }
#ifdef VCMI_ANDROID #ifdef VCMI_ANDROID
extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_notifyServerClosed(JNIEnv * env, jobject cls)
{
logNetwork->info("Received server closed signal");
if (CSH) {
CSH->campaignServerRestartLock.setn(false);
}
}
extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_notifyServerReady(JNIEnv * env, jobject cls) extern "C" JNIEXPORT void JNICALL Java_eu_vcmi_vcmi_NativeMethods_notifyServerReady(JNIEnv * env, jobject cls)
{ {
logNetwork->info("Received server ready signal"); logNetwork->info("Received server ready signal");