Kaynağa Gözat

don't render without focus

dmuratshin 9 yıl önce
ebeveyn
işleme
efa111d04a
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      oxygine/src/core/oxygine.cpp

+ 6 - 0
oxygine/src/core/oxygine.cpp

@@ -521,10 +521,16 @@ namespace oxygine
 
         bool  beginRendering(window w)
         {
+            
 #ifdef OXYGINE_SDL
             SDL_Window* wnd = w;
             if (!wnd)
+            {
+                if (!focus)
+                    return false;
+                
                 wnd = _window;
+            }
             SDL_GL_MakeCurrent(wnd, _context);
 #endif