mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +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.
|
||||
// http://www.xsquawkbox.net/xpsdk/mediawiki/DeferredInitialization
|
||||
XPLMRegisterFlightLoopCallback(startServerDeferred, -1, this);
|
||||
|
||||
m_atisSaved = m_atisEnabled.get();
|
||||
m_atisEnabled.set(0);
|
||||
}
|
||||
|
||||
CPlugin::~CPlugin()
|
||||
{
|
||||
m_atisEnabled.set(m_atisSaved);
|
||||
|
||||
XPLMUnregisterFlightLoopCallback(flightLoopCallback, this);
|
||||
m_dbusConnection->close();
|
||||
m_shouldStop = true;
|
||||
|
||||
@@ -72,6 +72,9 @@ namespace XSwiftBus
|
||||
CMenu m_planeViewSubMenu;
|
||||
CMenuItem planeViewOwnAircraftMenuItem;
|
||||
|
||||
DataRef<xplane::data::sim::atc::atis_enabled> m_atisEnabled;
|
||||
decltype(m_atisEnabled.get()) m_atisSaved = 0;
|
||||
|
||||
std::thread m_dbusThread;
|
||||
bool m_isRunning = false;
|
||||
bool m_shouldStop = false;
|
||||
|
||||
Reference in New Issue
Block a user