Selaa lähdekoodia

fixed android focus after restart

dmuratshin 9 vuotta sitten
vanhempi
sitoutus
03193f1ef6
1 muutettua tiedostoa jossa 7 lisäystä ja 3 poistoa
  1. 7 3
      oxygine/src/core/oxygine.cpp

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

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