mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 13:36:48 +08:00
refs #417 Add support for FSX and FS9
This commit is contained in:
@@ -78,30 +78,6 @@ namespace BlackSimPlugin
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::connectTo()
|
||||
{
|
||||
if (m_simConnected) { return true; }
|
||||
int oldStatus = getSimulatorStatus();
|
||||
if (FAILED(SimConnect_Open(&m_hSimConnect, BlackMisc::CProject::systemNameAndVersionChar(), nullptr, 0, 0, 0)))
|
||||
{
|
||||
m_simConnected = false;
|
||||
m_simPaused = false;
|
||||
m_simSimulating = false;
|
||||
emitSimulatorCombinedStatus(oldStatus);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_useFsuipc) { this->m_fsuipc->connect(); } // connect FSUIPC too
|
||||
}
|
||||
|
||||
initWhenConnected();
|
||||
m_simconnectTimerId = startTimer(10);
|
||||
m_simConnected = true;
|
||||
emitSimulatorCombinedStatus(oldStatus);
|
||||
return true;
|
||||
}
|
||||
|
||||
void CSimulatorFsx::asyncConnectTo()
|
||||
{
|
||||
connect(&m_watcherConnect, SIGNAL(finished()), this, SLOT(ps_connectToFinished()));
|
||||
|
||||
@@ -115,6 +91,8 @@ namespace BlackSimPlugin
|
||||
|
||||
QFuture<bool> result = QtConcurrent::run(asyncConnectFunc);
|
||||
m_watcherConnect.setFuture(result);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::disconnectFrom()
|
||||
|
||||
Reference in New Issue
Block a user