Browse Source

Merge remote-tracking branch 'origin/dev' into dev-continue-download

[email protected] 8 years ago
parent
commit
283eef488c
2 changed files with 10 additions and 9 deletions
  1. 4 8
      oxygine/src/AnimationFrame.cpp
  2. 6 1
      oxygine/src/core/oxygine.cpp

+ 4 - 8
oxygine/src/AnimationFrame.cpp

@@ -54,16 +54,10 @@ namespace oxygine
     {
         AnimationFrame f = *this;
         if (vertical)
-        {
-            f._srcRect.setY(_srcRect.getBottom());
-            f._srcRect.setHeight(-_srcRect.getHeight());
-        }
+            f.flipY();
 
         if (horizontal)
-        {
-            f._srcRect.setX(_srcRect.getRight());
-            f._srcRect.setWidth(-_srcRect.getWidth());
-        }
+            f.flipX();
 
         return f;
     }
@@ -72,12 +66,14 @@ namespace oxygine
     {
         _srcRect.setX(_srcRect.getRight());
         _srcRect.setWidth(-_srcRect.getWidth());
+        _destRect.pos.x = _frameSize.x - _destRect.getRight();
     }
 
     void AnimationFrame::flipY()
     {
         _srcRect.setY(_srcRect.getBottom());
         _srcRect.setHeight(-_srcRect.getHeight());
+        _destRect.pos.y = _frameSize.y - _destRect.getBottom();
     }
 
     AnimationFrame::AnimationFrame(spNativeTexture t)

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

@@ -383,7 +383,12 @@ namespace oxygine
 
 #if TARGET_OS_IPHONE
             //ios bug workaround
-            flags &= ~SDL_WINDOW_FULLSCREEN;
+            //flags &= ~SDL_WINDOW_FULLSCREEN;
+#endif
+            
+#if TARGET_OS_IPHONE || defined(__ANDROID__)
+            desc.w = -1;
+            desc.h = -1;
 #endif
 
             log::messageln("creating window %d %d", desc.w, desc.h);