diff --git a/jni/android_driver.c b/jni/android_driver.c index f63f804..5e1b1cd 100644 --- a/jni/android_driver.c +++ b/jni/android_driver.c @@ -262,6 +262,12 @@ void android_config_init(char *output, int maxlen) { (*g_env)->DeleteLocalRef(g_env, config_path); } +JNIEXPORT void JNICALL +Java_com_froop_app_kegs_AssetImages_nativeSync( JNIEnv* env, jobject thiz) { + sync(); + sync(); +} + // Instead of 'KegsView$KegsThread', the $ is encoded as _00024. // (not any more, but it was KegsView_00024KegsThread_mainLoop) JNIEXPORT void JNICALL diff --git a/src/com/froop/app/kegs/AssetImages.java b/src/com/froop/app/kegs/AssetImages.java index a1ae910..dc7a13b 100644 --- a/src/com/froop/app/kegs/AssetImages.java +++ b/src/com/froop/app/kegs/AssetImages.java @@ -46,6 +46,7 @@ class AssetImages extends AsyncTask { mConfigFile.ensureAssetCopied(mConfigFile.getImagePath(), "System 6 Shareware.zip", "System 6.hdv"); // TODO: could check to make sure they actually exist now. + nativeSync(); return true; } @@ -56,4 +57,7 @@ class AssetImages extends AsyncTask { protected void onPostExecute(final Boolean result) { mNotify.onAssetsReady(result); } + + // See jni/android_driver.c:nativeSync() + private native void nativeSync(); }