ecere/gui/drivers/Android: Fixed GUI lock mutex warnings
authorJerome St-Louis <jerome@ecere.com>
Tue, 2 Dec 2014 04:08:48 +0000 (23:08 -0500)
committerJerome St-Louis <jerome@ecere.com>
Sun, 15 Feb 2015 18:50:57 +0000 (13:50 -0500)
- Evolution was resetting the mutex somehow

ecere/src/gui/drivers/AndroidInterface.ec

index ce34dee..292784f 100644 (file)
@@ -1265,6 +1265,8 @@ class AndroidActivity : AndroidAppGlue
             for(c = app.classes.first; c && !eClass_IsDerived(c, class(GuiApplication)); c = c.next);
             if(!c) c = class(GuiApplication);
 
+            guiApp.lockMutex.Release();   // TOCHECK: Seems the evolve is losing our mutex lock here ?
+
             // Evolve the Application into it
             eInstance_Evolve((Instance *)&__androidCurrentModule, c);
             guiApp = (GuiApplication)__androidCurrentModule;
@@ -1275,6 +1277,8 @@ class AndroidActivity : AndroidAppGlue
                guiApp.SelectSkin(skin);
             }
 
+            guiApp.lockMutex.Wait();
+
             // Call Main()
             ((void (*)(void *))(void *)__androidCurrentModule._vTbl[12])(__androidCurrentModule);
          }