Sfoglia il codice sorgente

fixed android focus after restart

dmuratshin 9 anni fa
parent
commit
03193f1ef6
1 ha cambiato i file con 7 aggiunte e 3 eliminazioni
  1. 7 3
      oxygine/src/core/oxygine.cpp

+ 7 - 3
oxygine/src/core/oxygine.cpp

@@ -182,6 +182,9 @@ namespace oxygine
 
     namespace core
     {
+        static bool active = true;
+        static bool focus = true;
+
         void focusLost()
         {
             if (!LOST_RESET_CONTEXT)
@@ -260,11 +263,14 @@ namespace oxygine
 
             init0();
 
-
             log::messageln("initialize oxygine");
             if (desc_ptr)
                 desc = *desc_ptr;
 
+
+            focus = true;
+            active = true;
+
 #ifdef __S3E__
             log::messageln("S3E build");
             if (!IwGLInit())
@@ -473,8 +479,6 @@ namespace oxygine
         }
 #endif
 
-        bool active = true;
-        bool focus = true;
 
 
         bool isActive()