mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +08:00
Enable MSFS 64 bit build
This commit is contained in:
committed by
Mat Sutcliffe
parent
7e04a2c40f
commit
308081cfcc
@@ -244,6 +244,35 @@ bool loadAndResolveP3DSimConnect(P3DSimConnectVersion version)
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool loadAndResolveMSFSimConnect()
|
||||
{
|
||||
// Check if already loaded
|
||||
if (gSymbols.SimConnect_Open) { return true; }
|
||||
|
||||
QString simConnectFileName(QStringLiteral("SimConnect.MSFS"));
|
||||
|
||||
QLibrary simConnectDll(simConnectFileName);
|
||||
simConnectDll.setLoadHints(QLibrary::PreventUnloadHint);
|
||||
if (simConnectDll.load())
|
||||
{
|
||||
const bool resolvedCommon = resolveCommonSimConnectSymbols(simConnectDll);
|
||||
if (!resolvedCommon)
|
||||
{
|
||||
CLogMessage(CLogCategories::driver()).error(u"Failed to resolve common symbols from SimConnect.dll: '%1'") << simConnectFileName;
|
||||
return false;
|
||||
}
|
||||
|
||||
CLogMessage(CLogCategories::driver()).info(u"Loaded and resolved MSFS symbols from SimConnect.dll: '%1'") << simConnectFileName;
|
||||
return resolvedCommon;
|
||||
}
|
||||
else
|
||||
{
|
||||
CLogMessage(CLogCategories::driver()).error(u"Failed to load SimConnect.dll: '%1' '%2'") << simConnectFileName << simConnectDll.errorString();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
bool loadAndResolveFsxSimConnect(bool manifestProbing)
|
||||
{
|
||||
|
||||
@@ -39,6 +39,8 @@ FSXCOMMON_EXPORT bool loadAndResolveP3DSimConnect(P3DSimConnectVersion version);
|
||||
//! Same but string version
|
||||
inline bool loadAndResolveP3DSimConnectByString(const QString &version) { return loadAndResolveP3DSimConnect(stringToP3DVersion(version)); }
|
||||
|
||||
FSXCOMMON_EXPORT bool loadAndResolveMSFSimConnect();
|
||||
|
||||
#else
|
||||
|
||||
//! Load and resolve FSX SimConnect.
|
||||
|
||||
Reference in New Issue
Block a user