Skip to content

Commit

Permalink
libxbmc: split gui creation out of Create()
Browse files Browse the repository at this point in the history
  • Loading branch information
theuni committed Jun 7, 2012
1 parent 9ad6f4e commit 3edc1af
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
8 changes: 6 additions & 2 deletions xbmc/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -743,6 +743,11 @@ bool CApplication::Create()

m_lastFrameTime = XbmcThreads::SystemClockMillis();
m_lastRenderTime = m_lastFrameTime;
return true;
}

bool CApplication::CreateGUI()
{
#ifdef HAS_SDL
CLog::Log(LOGNOTICE, "Setup SDL");

Expand Down Expand Up @@ -775,7 +780,6 @@ bool CApplication::Create()
setenv("__GL_YIELD", "USLEEP", 0);
#endif


m_bSystemScreenSaverEnable = g_Windowing.IsSystemScreenSaverEnabled();
g_Windowing.EnableSystemScreenSaver(false);

Expand Down Expand Up @@ -868,7 +872,7 @@ bool CApplication::Create()
g_settings.m_ResInfo[iResolution].strMode.c_str());
g_windowManager.Initialize();

return Initialize();
return true;
}

bool CApplication::InitDirectoriesLinux()
Expand Down
1 change: 1 addition & 0 deletions xbmc/Application.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ class CApplication : public CXBApplicationEx, public IPlayerCallback, public IMs
virtual bool Create();
virtual bool Cleanup();

bool CreateGUI();
void StartServices();
void StopServices();
bool StartWebServer();
Expand Down
10 changes: 10 additions & 0 deletions xbmc/xbmc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,16 @@ int main(int argc, char* argv[])
fprintf(stderr, "ERROR: Unable to create application. Exiting\n");
return status;
}
if (!g_application.CreateGUI())
{
fprintf(stderr, "ERROR: Unable to create GUI. Exiting\n");
return status;
}
if (!g_application.Initialize())
{
fprintf(stderr, "ERROR: Unable to Initialize. Exiting\n");
return status;
}

try
{
Expand Down

0 comments on commit 3edc1af

Please sign in to comment.