mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
committed by
Mathew Sutcliffe
parent
5e19431d2b
commit
aa14c564b0
@@ -288,19 +288,22 @@ void SwiftGuiStd::ps_handleTimerBasedUpdates()
|
|||||||
|
|
||||||
void SwiftGuiStd::setContextAvailability()
|
void SwiftGuiStd::setContextAvailability()
|
||||||
{
|
{
|
||||||
bool corePreviouslyAvailable = this->m_coreAvailable;
|
const bool corePreviouslyAvailable = this->m_coreAvailable;
|
||||||
if (sGui && sGui->getIContextApplication()->isUsingImplementingObject())
|
if (sGui &&
|
||||||
|
!sGui->isShuttingDown() &&
|
||||||
|
sGui->getIContextApplication() &&
|
||||||
|
sGui->getIContextApplication()->isUsingImplementingObject())
|
||||||
{
|
{
|
||||||
this->m_coreAvailable = true;
|
// ping to check if core is still alive
|
||||||
|
this->m_coreAvailable = this->isMyIdentifier(sGui->getIContextApplication()->registerApplication(getCurrentTimestampIdentifier()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ping to check if core is still alive
|
this->m_coreAvailable = false;
|
||||||
this->m_coreAvailable = sGui &&
|
|
||||||
this->isMyIdentifier(sGui->getIContextApplication()->registerApplication(getCurrentTimestampIdentifier()));
|
|
||||||
}
|
}
|
||||||
this->m_contextNetworkAvailable = this->m_coreAvailable || (sGui && sGui->getIContextNetwork()->isUsingImplementingObject());
|
|
||||||
this->m_contextAudioAvailable = this->m_coreAvailable || (sGui && sGui->getIContextAudio()->isUsingImplementingObject());
|
this->m_contextNetworkAvailable = this->m_coreAvailable && sGui->getIContextNetwork() && sGui->getIContextNetwork()->isUsingImplementingObject();
|
||||||
|
this->m_contextAudioAvailable = this->m_coreAvailable && sGui->getIContextAudio() && sGui->getIContextAudio()->isUsingImplementingObject();
|
||||||
|
|
||||||
// react to a change in core's availability
|
// react to a change in core's availability
|
||||||
if (this->m_coreAvailable != corePreviouslyAvailable)
|
if (this->m_coreAvailable != corePreviouslyAvailable)
|
||||||
|
|||||||
Reference in New Issue
Block a user