gui: make sure we leave fullscreen if we start a player without media
authorJoakim Plate <elupus@ecce.se>
Mon, 29 Oct 2012 21:19:04 +0000 (22:19 +0100)
committerJoakim Plate <elupus@ecce.se>
Sun, 20 Jan 2013 17:31:22 +0000 (18:31 +0100)
xbmc/Application.cpp

index 8a00fd8..39476ad 100644 (file)
@@ -4182,7 +4182,7 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
     }
 
 #ifdef HAS_VIDEO_PLAYBACK
-    if( IsPlayingVideo() )
+    else if( IsPlayingVideo() )
     {
       if (g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION)
         g_windowManager.ActivateWindow(WINDOW_FULLSCREEN_VIDEO);
@@ -4211,6 +4211,13 @@ bool CApplication::PlayFile(const CFileItem& item, bool bRestart)
       }
     }
 #endif
+    else
+    {
+      if (g_windowManager.GetActiveWindow() == WINDOW_VISUALISATION
+      ||  g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO)
+        g_windowManager.PreviousWindow();
+
+    }
 
 #if !defined(TARGET_DARWIN) && !defined(_LINUX)
     g_audioManager.Enable(false);