Merge pull request #4693 from Memphiz/remove_background
authorMemphiz <memphis@machzwo.de>
Tue, 13 May 2014 12:57:28 +0000 (14:57 +0200)
committerTrent Nelson <trent.nelson@pivosgroup.com>
Sat, 7 Jun 2014 05:27:36 +0000 (13:27 +0800)
[application] - remove m_bInBackground and its setter/getter and use

xbmc/Application.cpp
xbmc/Application.h
xbmc/osx/IOSEAGLView.mm

index 9242d53..ff698d6 100644 (file)
@@ -410,8 +410,6 @@ CApplication::CApplication(void)
   XInitThreads();
 #endif
 
-  // we start in frontend
-  m_bInBackground = false;
 
   /* for now always keep this around */
 #ifdef HAS_KARAOKE
@@ -2198,7 +2196,7 @@ float CApplication::GetDimScreenSaverLevel() const
 void CApplication::Render()
 {
   // do not render if we are stopped or in background
-  if (m_bStop || m_bInBackground)
+  if (m_bStop)
     return;
 
   MEASURE_FUNCTION;
@@ -4621,8 +4619,6 @@ bool CApplication::WakeUpScreenSaver(bool bPowerOffKeyPressed /* = false */)
 
 void CApplication::CheckScreenSaverAndDPMS()
 {
-  if (m_bInBackground)
-    return;
   if (!m_dpmsIsActive)
     g_Windowing.ResetOSScreensaver();
 
@@ -4714,15 +4710,6 @@ void CApplication::ActivateScreenSaver(bool forceType /*= false */)
     g_windowManager.ActivateWindow(WINDOW_SCREENSAVER);
 }
 
-void CApplication::SetInBackground(bool background)
-{
-  if (!background)
-  {
-    ResetScreenSaverTimer();
-  }
-  m_bInBackground = background;
-}
-
 void CApplication::CheckShutdown()
 {
   // first check if we should reset the timer
index e3a26c5..15e86c8 100644 (file)
@@ -283,10 +283,6 @@ public:
   PlayState m_ePlayState;
   CCriticalSection m_playStateMutex;
 
-  bool m_bInBackground;
-  inline bool IsInBackground() { return m_bInBackground; };
-  void SetInBackground(bool background);
-
   CKaraokeLyricsManager* m_pKaraokeMgr;
 
   PLAYERCOREID m_eForcedNextPlayer;
index b3eb934..67b9619 100644 (file)
 {
   PRINT_SIGNATURE();
   pause = TRUE;
-  g_application.SetInBackground(true);
+  g_application.SetRenderGUI(false);
 }
 //--------------------------------------------------------------
 - (void) resumeAnimation
 {
   PRINT_SIGNATURE();
   pause = FALSE;
-  g_application.SetInBackground(false);
+  g_application.SetRenderGUI(true);
 }
 //--------------------------------------------------------------
 - (void) startAnimation