Merge pull request #4404 from popcornmix/3daspect
authorjmarshallnz <jcmarsha@gmail.com>
Wed, 12 Mar 2014 22:50:25 +0000 (11:50 +1300)
committerJonathan Marshall <jmarshall@xbmc.org>
Fri, 14 Mar 2014 21:47:58 +0000 (10:47 +1300)
[omxplayer] When setting fullscreen flag we don't want noaspect

xbmc/cores/omxplayer/OMXVideo.cpp

index e0ea992..6a4ce92 100644 (file)
@@ -838,19 +838,24 @@ void COMXVideo::SetVideoRect(const CRect& SrcRect, const CRect& DestRect)
   configDisplay.fullscreen = OMX_FALSE;
   configDisplay.noaspect   = OMX_TRUE;
 
-  configDisplay.set                 = (OMX_DISPLAYSETTYPE)(OMX_DISPLAY_SET_DEST_RECT|OMX_DISPLAY_SET_SRC_RECT|OMX_DISPLAY_SET_FULLSCREEN|OMX_DISPLAY_SET_NOASPECT);
-  configDisplay.dest_rect.x_offset  = (int)(DestRect.x1+0.5f);
-  configDisplay.dest_rect.y_offset  = (int)(DestRect.y1+0.5f);
-  configDisplay.dest_rect.width     = (int)(DestRect.Width()+0.5f);
-  configDisplay.dest_rect.height    = (int)(DestRect.Height()+0.5f);
-
-  configDisplay.src_rect.x_offset   = (int)(SrcRect.x1+0.5f);
-  configDisplay.src_rect.y_offset   = (int)(SrcRect.y1+0.5f);
-  configDisplay.src_rect.width      = (int)(SrcRect.Width()+0.5f);
-  configDisplay.src_rect.height     = (int)(SrcRect.Height()+0.5f);
-
-  configDisplay.fullscreen          = configDisplay.dest_rect.width == 0 || configDisplay.dest_rect.width == 0 ? OMX_TRUE : OMX_FALSE;
+  if (configDisplay.dest_rect.width == 0 || configDisplay.dest_rect.height == 0)
+  {
+    configDisplay.set                 = OMX_DISPLAY_SET_FULLSCREEN;
+    configDisplay.fullscreen          = OMX_TRUE;
+  }
+  else
+  {
+    configDisplay.set                 = (OMX_DISPLAYSETTYPE)(OMX_DISPLAY_SET_DEST_RECT|OMX_DISPLAY_SET_SRC_RECT|OMX_DISPLAY_SET_NOASPECT);
+    configDisplay.dest_rect.x_offset  = (int)(DestRect.x1+0.5f);
+    configDisplay.dest_rect.y_offset  = (int)(DestRect.y1+0.5f);
+    configDisplay.dest_rect.width     = (int)(DestRect.Width()+0.5f);
+    configDisplay.dest_rect.height    = (int)(DestRect.Height()+0.5f);
 
+    configDisplay.src_rect.x_offset   = (int)(SrcRect.x1+0.5f);
+    configDisplay.src_rect.y_offset   = (int)(SrcRect.y1+0.5f);
+    configDisplay.src_rect.width      = (int)(SrcRect.Width()+0.5f);
+    configDisplay.src_rect.height     = (int)(SrcRect.Height()+0.5f);
+  }
   m_omx_render.SetConfig(OMX_IndexConfigDisplayRegion, &configDisplay);
 
   CLog::Log(LOGDEBUG, "dest_rect.x_offset %d dest_rect.y_offset %d dest_rect.width %d dest_rect.height %d\n",