mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 21:56:43 +08:00
This commit is contained in:
@@ -51,9 +51,6 @@ namespace BlackSimPlugin
|
||||
//! \copydoc ISimulator::isConnected()
|
||||
virtual bool isConnected() const override;
|
||||
|
||||
//! \copydoc ISimulator::canConnect()
|
||||
virtual bool canConnect() const override { return true; }
|
||||
|
||||
//! \copydoc ISimulator::isSimulating
|
||||
virtual bool isSimulating() const override { return isConnected(); }
|
||||
|
||||
|
||||
@@ -128,15 +128,6 @@ namespace BlackSimPlugin
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::canConnect() const
|
||||
{
|
||||
if (m_simConnected) { return true; }
|
||||
HANDLE hSimConnect; // temporary handle
|
||||
bool connect = SUCCEEDED(SimConnect_Open(&hSimConnect, BlackMisc::CProject::systemNameAndVersionChar(), nullptr, 0, 0, 0));
|
||||
SimConnect_Close(hSimConnect);
|
||||
return connect;
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::physicallyAddRemoteAircraft(const Simulation::CSimulatedAircraft &newRemoteAircraft)
|
||||
{
|
||||
CCallsign callsign(newRemoteAircraft.getCallsign());
|
||||
|
||||
@@ -89,9 +89,6 @@ namespace BlackSimPlugin
|
||||
//! \copydoc ISimulator::isSimulating
|
||||
virtual bool isSimulating() const override;
|
||||
|
||||
//! \copydoc ISimulator::canConnect()
|
||||
virtual bool canConnect() const override;
|
||||
|
||||
//! SimConnect Callback
|
||||
static void CALLBACK SimConnectProc(SIMCONNECT_RECV *pData, DWORD cbData, void *pContext);
|
||||
|
||||
|
||||
@@ -156,14 +156,6 @@ namespace BlackSimPlugin
|
||||
return m_service && m_traffic;
|
||||
}
|
||||
|
||||
bool CSimulatorXPlane::canConnect() const
|
||||
{
|
||||
if (isConnected()) { return true; }
|
||||
auto conn = QDBusConnection::sessionBus(); // TODO make this configurable
|
||||
CXBusServiceProxy dummy(conn, nullptr, true);
|
||||
return dummy.isValid();
|
||||
}
|
||||
|
||||
bool CSimulatorXPlane::connectTo()
|
||||
{
|
||||
if (isConnected())
|
||||
|
||||
@@ -41,9 +41,6 @@ namespace BlackSimPlugin
|
||||
//! \copydoc BlackCore::ISimulator::isConnected
|
||||
virtual bool isConnected() const override;
|
||||
|
||||
//! \copydoc BlackCore::ISimulator::canConnect
|
||||
virtual bool canConnect() const override;
|
||||
|
||||
//! \copydoc ISimulator::isTimeSynchronized
|
||||
virtual bool isTimeSynchronized() const override { return false; } // TODO: Can we query the XP intrinisc feature?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user