Browse Source

minor improve

dmuratshin 9 years ago
parent
commit
f8a1234868
1 changed files with 11 additions and 0 deletions
  1. 11 0
      examples/Demo/src/TestManageRes.h

+ 11 - 0
examples/Demo/src/TestManageRes.h

@@ -2,6 +2,7 @@
 #include "test.h"
 #include "ThreadLoader.h"
 #include "pthread.h"
+#include "core/oxygine.h"
 
 #ifdef EMSCRIPTEN
 #include <emscripten.h>
@@ -13,6 +14,16 @@ void* myThreadFunc(void* t)
     Test* test = (Test*)t;
     resources.load();
 
+#ifndef __S3E__
+
+    //sync with game thread and show notification
+    core::getMainThreadMessages().postCallback([ = ]()
+    {
+        test->notify("loaded");
+    });
+
+#endif
+
     return 0;
 }