mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-02 15:15:39 +08:00
Disable X-Plane's built-in voice ATIS when XSwiftBus is active.
This commit is contained in:
@@ -66,10 +66,15 @@ namespace XSwiftBus
|
|||||||
// Delay the start of XSwiftBus.
|
// Delay the start of XSwiftBus.
|
||||||
// http://www.xsquawkbox.net/xpsdk/mediawiki/DeferredInitialization
|
// http://www.xsquawkbox.net/xpsdk/mediawiki/DeferredInitialization
|
||||||
XPLMRegisterFlightLoopCallback(startServerDeferred, -1, this);
|
XPLMRegisterFlightLoopCallback(startServerDeferred, -1, this);
|
||||||
|
|
||||||
|
m_atisSaved = m_atisEnabled.get();
|
||||||
|
m_atisEnabled.set(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CPlugin::~CPlugin()
|
CPlugin::~CPlugin()
|
||||||
{
|
{
|
||||||
|
m_atisEnabled.set(m_atisSaved);
|
||||||
|
|
||||||
XPLMUnregisterFlightLoopCallback(flightLoopCallback, this);
|
XPLMUnregisterFlightLoopCallback(flightLoopCallback, this);
|
||||||
m_dbusConnection->close();
|
m_dbusConnection->close();
|
||||||
m_shouldStop = true;
|
m_shouldStop = true;
|
||||||
|
|||||||
@@ -72,6 +72,9 @@ namespace XSwiftBus
|
|||||||
CMenu m_planeViewSubMenu;
|
CMenu m_planeViewSubMenu;
|
||||||
CMenuItem planeViewOwnAircraftMenuItem;
|
CMenuItem planeViewOwnAircraftMenuItem;
|
||||||
|
|
||||||
|
DataRef<xplane::data::sim::atc::atis_enabled> m_atisEnabled;
|
||||||
|
decltype(m_atisEnabled.get()) m_atisSaved = 0;
|
||||||
|
|
||||||
std::thread m_dbusThread;
|
std::thread m_dbusThread;
|
||||||
bool m_isRunning = false;
|
bool m_isRunning = false;
|
||||||
bool m_shouldStop = false;
|
bool m_shouldStop = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user