mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Load P3D 64 bit SimConnect shared library at runtime
This aligns the behavior and concept with the 32 bit FSX version. SimConnect is loaded at runtime, depending on the version being selected. It also adds a featuren to change the P3D SimConnect version at runtime by unloading the previous and loading a new one. ref T349
This commit is contained in:
committed by
Klaus Basan
parent
0f140cb155
commit
f63008dd3f
@@ -8,6 +8,7 @@
|
||||
*/
|
||||
|
||||
#include "simulatorfsx.h"
|
||||
#include "../fsxcommon/simconnectsymbols.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Aviation;
|
||||
@@ -39,5 +40,18 @@ namespace BlackSimPlugin
|
||||
CAircraftIcaoCode("B738", "L2J")
|
||||
});
|
||||
}
|
||||
|
||||
bool CSimulatorFsx::connectTo()
|
||||
{
|
||||
if (!loadAndResolveFsxSimConnect(true)) { return false; }
|
||||
return CSimulatorFsxCommon::connectTo();
|
||||
}
|
||||
|
||||
void CSimulatorFsxListener::startImpl()
|
||||
{
|
||||
if (!loadAndResolveFsxSimConnect(true)) { return; }
|
||||
return CSimulatorFsxCommonListener::startImpl();
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -31,6 +31,11 @@ namespace BlackSimPlugin
|
||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider,
|
||||
BlackMisc::Network::IClientProvider *clientProvider,
|
||||
QObject *parent = nullptr);
|
||||
|
||||
//! \name ISimulator implementations
|
||||
//! @{
|
||||
virtual bool connectTo() override;
|
||||
//! @}
|
||||
};
|
||||
|
||||
//! Listener for FSX
|
||||
@@ -41,6 +46,9 @@ namespace BlackSimPlugin
|
||||
public:
|
||||
//! Constructor
|
||||
using CSimulatorFsxCommonListener::CSimulatorFsxCommonListener;
|
||||
|
||||
protected:
|
||||
virtual void startImpl() override;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user