mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 16:56:53 +08:00
[FSX] Signal simulator connected once SIMCONNECT_RECV_OPEN is received
refs #549
This commit is contained in:
@@ -95,8 +95,6 @@ namespace BlackSimPlugin
|
||||
initEvents();
|
||||
initDataDefinitionsWhenConnected();
|
||||
m_simconnectTimerId = startTimer(10);
|
||||
m_simConnected = true;
|
||||
emitSimulatorCombinedStatus();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -296,6 +294,12 @@ namespace BlackSimPlugin
|
||||
return CCollection<CCallsign>(this->m_simConnectObjects.keys());
|
||||
}
|
||||
|
||||
void CSimulatorFsx::setSimConnected()
|
||||
{
|
||||
m_simConnected = true;
|
||||
emitSimulatorCombinedStatus();
|
||||
}
|
||||
|
||||
void CSimulatorFsx::onSimRunning()
|
||||
{
|
||||
if (m_simSimulating) { return; }
|
||||
|
||||
@@ -146,6 +146,9 @@ namespace BlackSimPlugin
|
||||
void ps_reloadSettings();
|
||||
|
||||
private:
|
||||
//! Call this method to declare the simulator connected
|
||||
void setSimConnected();
|
||||
|
||||
//! Called when sim has started
|
||||
void onSimRunning();
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace BlackSimPlugin
|
||||
.arg(event->dwApplicationVersionMajor).arg(event->dwApplicationVersionMinor).arg(event->dwApplicationBuildMajor).arg(event->dwApplicationBuildMinor)
|
||||
.arg(event->dwSimConnectVersionMajor).arg(event->dwSimConnectVersionMinor).arg(event->dwSimConnectBuildMajor).arg(event->dwSimConnectBuildMinor);
|
||||
CLogMessage(static_cast<CSimulatorFsx *>(nullptr)).info("Connect to FSX: %1") << sApp->swiftVersionString();
|
||||
simulatorFsx->setSimConnected();
|
||||
break;
|
||||
}
|
||||
case SIMCONNECT_RECV_ID_EXCEPTION:
|
||||
|
||||
Reference in New Issue
Block a user