Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[WIN32] removed m_AppActive and use SetRenderGui instead.

  • Loading branch information...
commit 8c48567d6fb99f068b290af4f8f3f95be142516a 1 parent c469434
wsoltys authored
10 xbmc/Application.cpp
View
@@ -2358,13 +2358,6 @@ void CApplication::Render()
if (m_bStop || m_bInBackground)
return;
- if (!m_AppActive && !m_bStop && (!IsPlayingVideo() || IsPaused()))
- {
- Sleep(1);
- ResetScreenSaver();
- return;
- }
-
MEASURE_FUNCTION;
int vsync_mode = g_guiSettings.GetInt("videoscreen.vsync");
@@ -3081,8 +3074,8 @@ void CApplication::FrameMove(bool processEvents, bool processGUI)
}
}
g_graphicsContext.Unlock();
- CWinEvents::MessagePump();
}
+ CWinEvents::MessagePump();
#if defined(HAS_LIRC) || defined(HAS_IRSERVERSUITE)
// Read the input from a remote
@@ -3672,7 +3665,6 @@ void CApplication::Stop(int exitCode)
CLog::Log(LOGNOTICE, "Not saving settings (settings.xml is not present)");
m_bStop = true;
- m_AppActive = false;
m_AppFocused = false;
m_ExitCode = exitCode;
CLog::Log(LOGNOTICE, "stop all");
1  xbmc/Application.h
View
@@ -376,6 +376,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
CSplash* GetSplash() { return m_splash; }
void SetRenderGUI(bool renderGUI);
+ bool GetRenderGUI() const { return m_renderGUI; };
bool SetLanguage(const CStdString &strLanguage);
protected:
2  xbmc/XBApplicationEx.cpp
View
@@ -38,7 +38,6 @@ CXBApplicationEx::CXBApplicationEx()
{
// Variables to perform app timing
m_bStop = false;
- m_AppActive = true;
m_AppFocused = true;
m_ExitCode = EXITCODE_QUIT;
m_renderGUI = false;
@@ -53,7 +52,6 @@ bool CXBApplicationEx::Create()
{
// Variables to perform app timing
m_bStop = false;
- m_AppActive = true;
m_AppFocused = true;
m_ExitCode = EXITCODE_QUIT;
1  xbmc/XBApplicationEx.h
View
@@ -40,7 +40,6 @@ class CXBApplicationEx : public IWindowManagerCallback
// Variables for timing
bool m_bStop;
int m_ExitCode;
- bool m_AppActive;
bool m_AppFocused;
bool m_renderGUI;
2  xbmc/android/activity/XBMCApp.cpp
View
@@ -306,8 +306,6 @@ void CXBMCApp::XBMC_Pause(bool pause)
// Only send the PAUSE action if we are pausing XBMC and something is currently playing
if (pause && g_application.IsPlaying() && !g_application.IsPaused())
CApplicationMessenger::Get().SendAction(CAction(ACTION_PAUSE), WINDOW_INVALID, true);
-
- g_application.m_AppActive = g_application.m_AppFocused = !pause;
}
void CXBMCApp::XBMC_Stop()
7 xbmc/guilib/GUIWindowManager.cpp
View
@@ -511,11 +511,8 @@ void CGUIWindowManager::Process(unsigned int currentTime)
pWindow->DoProcess(currentTime, dirtyregions);
}
- if (g_application.m_AppActive)
- {
- for (CDirtyRegionList::iterator itr = dirtyregions.begin(); itr != dirtyregions.end(); itr++)
- m_tracker.MarkDirtyRegion(*itr);
- }
+ for (CDirtyRegionList::iterator itr = dirtyregions.begin(); itr != dirtyregions.end(); itr++)
+ m_tracker.MarkDirtyRegion(*itr);
}
void CGUIWindowManager::MarkDirty()
4 xbmc/windowing/WinEventsSDL.cpp
View
@@ -240,8 +240,8 @@ bool CWinEventsSDL::MessagePump()
//If the window was inconified or restored
if( event.active.state & SDL_APPACTIVE )
{
- g_application.m_AppActive = event.active.gain != 0;
- g_Windowing.NotifyAppActiveChange(g_application.m_AppActive);
+ g_application.SetRenderGUI(event.active.gain != 0);
+ g_Windowing.NotifyAppActiveChange(g_application.GetRenderGUI());
}
else if (event.active.state & SDL_APPINPUTFOCUS)
{
24 xbmc/windowing/windows/WinEventsWin32.cpp
View
@@ -432,11 +432,11 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
break;
case WM_SHOWWINDOW:
{
- bool active = g_application.m_AppActive;
- g_application.m_AppActive = wParam != 0;
- if (g_application.m_AppActive != active)
- g_Windowing.NotifyAppActiveChange(g_application.m_AppActive);
- CLog::Log(LOGDEBUG, __FUNCTION__"Window is %s", g_application.m_AppActive ? "shown" : "hidden");
+ bool active = g_application.GetRenderGUI();
+ g_application.SetRenderGUI(wParam != 0);
+ if (g_application.GetRenderGUI() != active)
+ g_Windowing.NotifyAppActiveChange(g_application.GetRenderGUI());
+ CLog::Log(LOGDEBUG, __FUNCTION__"Window is %s", g_application.GetRenderGUI() ? "shown" : "hidden");
}
break;
case WM_ACTIVATE:
@@ -444,10 +444,10 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
if( WA_INACTIVE != wParam )
g_Joystick.Reinitialize();
- bool active = g_application.m_AppActive;
+ bool active = g_application.GetRenderGUI();
if (HIWORD(wParam))
{
- g_application.m_AppActive = false;
+ g_application.SetRenderGUI(false);
}
else
{
@@ -456,16 +456,16 @@ LRESULT CALLBACK CWinEventsWin32::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, L
if (LOWORD(wParam) != WA_INACTIVE)
{
if (GetWindowPlacement(hWnd, &lpwndpl))
- g_application.m_AppActive = lpwndpl.showCmd != SW_HIDE;
+ g_application.SetRenderGUI(lpwndpl.showCmd != SW_HIDE);
}
else
{
- g_application.m_AppActive = g_Windowing.WindowedMode();
+ g_application.SetRenderGUI(g_Windowing.WindowedMode());
}
}
- if (g_application.m_AppActive != active)
- g_Windowing.NotifyAppActiveChange(g_application.m_AppActive);
- CLog::Log(LOGDEBUG, __FUNCTION__"Window is %s", g_application.m_AppActive ? "active" : "inactive");
+ if (g_application.GetRenderGUI() != active)
+ g_Windowing.NotifyAppActiveChange(g_application.GetRenderGUI());
+ CLog::Log(LOGDEBUG, __FUNCTION__"Window is %s", g_application.GetRenderGUI() ? "active" : "inactive");
}
break;
case WM_SETFOCUS:
Please sign in to comment.
Something went wrong with that request. Please try again.