diff android/dw.cpp @ 2496:3bf2f08fdc45

Android: Remove ugly workaround for initialization issues. Solved by a change to AndroidManifest.xml to prevent recreation on configuration changes. Add some code to detect the changes.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Mon, 03 May 2021 07:15:11 +0000
parents 5664c91d03fb
children 4ae2b3b77f25
line wrap: on
line diff
--- a/android/dw.cpp	Mon May 03 01:17:40 2021 +0000
+++ b/android/dw.cpp	Mon May 03 07:15:11 2021 +0000
@@ -89,15 +89,8 @@
 {
     static int runcount = 0;
 
-    /* Safety check to prevent multiple initializations...
-     * In the simulator I get multiple calls, and code only works on the second call.
-     * On actual hardware we only get called once... so this works around that.
-     */
-#if defined(__arm__) || defined(__aarch64__)
+    /* Safety check to prevent multiple initializations... */
     if(runcount == 0)
-#else
-    if(runcount == 1)
-#endif
     {
         char *arg = strdup(env->GetStringUTFChars((jstring) path, NULL));