gui/movieplayer.cpp: allow getInstance() to return background instance

This commit is contained in:
[CST] Focus
2015-10-16 14:53:35 +03:00
parent 1b7f575a37
commit c4197fb5f3
2 changed files with 3 additions and 3 deletions

View File

@@ -85,7 +85,7 @@ cPlayback *CMoviePlayerGui::playback;
CMovieBrowser* CMoviePlayerGui::moviebrowser;
CBookmarkManager * CMoviePlayerGui::bookmarkmanager;
CMoviePlayerGui& CMoviePlayerGui::getInstance()
CMoviePlayerGui& CMoviePlayerGui::getInstance(bool background)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> m_lock(bgmutex);
if (!instance_mp )
@@ -94,7 +94,7 @@ CMoviePlayerGui& CMoviePlayerGui::getInstance()
instance_bg = new CMoviePlayerGui();
printf("[neutrino CMoviePlayerGui] Instance created...\n");
}
return *instance_mp;
return background ? *instance_bg : *instance_mp;
}
CMoviePlayerGui::CMoviePlayerGui()

View File

@@ -195,7 +195,7 @@ class CMoviePlayerGui : public CMenuTarget
public:
~CMoviePlayerGui();
static CMoviePlayerGui& getInstance();
static CMoviePlayerGui& getInstance(bool background = false);
int exec(CMenuTarget* parent, const std::string & actionKey);
bool Playing() { return playing; };