mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T111, some fixes in the vicinity of plugin / drivers
* mostly style / doxygen / formatting * assert/verify
This commit is contained in:
committed by
Mathew Sutcliffe
parent
e72546d282
commit
29e1d54e05
@@ -153,11 +153,6 @@ namespace BlackSimPlugin
|
||||
}
|
||||
}
|
||||
|
||||
void CLobbyClient::cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
HRESULT CLobbyClient::allocAndInitConnectSettings(const QString &address, GUID *pAppGuid, DPL_CONNECTION_SETTINGS **ppdplConnectSettings)
|
||||
{
|
||||
HRESULT hr;
|
||||
@@ -337,8 +332,7 @@ namespace BlackSimPlugin
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return S_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -18,12 +18,11 @@ namespace BlackSimPlugin
|
||||
void disconnected();
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
CLobbyClient(QObject *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
~CLobbyClient();
|
||||
virtual ~CLobbyClient();
|
||||
|
||||
//! Initialize DirectPlay
|
||||
HRESULT initDirectPlay();
|
||||
@@ -34,11 +33,7 @@ namespace BlackSimPlugin
|
||||
//! Connect FS9 simulator to our host
|
||||
HRESULT connectFs9ToHost(const QString address);
|
||||
|
||||
//! Cleanup & be ready to another connection
|
||||
void cleanup();
|
||||
|
||||
private:
|
||||
|
||||
//! Alloc and fill up a DPL_CONNECTION_SETTINGS. Call FreeConnectSettings later to free it.
|
||||
HRESULT allocAndInitConnectSettings(const QString &address, GUID* pAppGuid, DPL_CONNECTION_SETTINGS** ppdplConnectSettings );
|
||||
|
||||
@@ -67,6 +62,5 @@ namespace BlackSimPlugin
|
||||
|
||||
static const size_t m_maxSizePlayerName = 14;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
namespace Fs9
|
||||
{
|
||||
CAircraftSituation aircraftSituationfromFS9(const MPPositionVelocity &positionVelocity)
|
||||
CAircraftSituation aircraftSituationFromFS9(const MPPositionVelocity &positionVelocity)
|
||||
{
|
||||
CAircraftSituation situation;
|
||||
|
||||
@@ -259,6 +259,7 @@ namespace BlackSimPlugin
|
||||
|
||||
if (newTransponder.getTransponderMode() != this->m_simTransponder.getTransponderMode())
|
||||
{
|
||||
// void
|
||||
}
|
||||
|
||||
// avoid changes of cockpit back to old values due to an outdated read back value
|
||||
@@ -343,7 +344,7 @@ namespace BlackSimPlugin
|
||||
{
|
||||
MPPositionVelocity mpPositionVelocity;
|
||||
MultiPlayerPacketParser::readMessage(message, mpPositionVelocity);
|
||||
auto aircraftSituation = aircraftSituationfromFS9(mpPositionVelocity);
|
||||
auto aircraftSituation = aircraftSituationFromFS9(mpPositionVelocity);
|
||||
updateOwnSituation(aircraftSituation);
|
||||
|
||||
if (m_isWeatherActivated)
|
||||
@@ -435,7 +436,7 @@ namespace BlackSimPlugin
|
||||
if (m_isConnecting || m_lobbyClient->connectFs9ToHost(m_fs9Host->getHostAddress()) == S_OK)
|
||||
{
|
||||
m_isConnecting = true;
|
||||
CLogMessage(this).info("Swift is joining FS9 to the multiplayer session...");
|
||||
CLogMessage(this).info("swift is joining FS9 to the multiplayer session...");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ namespace BlackSimPlugin
|
||||
QSharedPointer<CFs9Host> m_fs9Host;
|
||||
QSharedPointer<CLobbyClient> m_lobbyClient;
|
||||
};
|
||||
} // namespace Fs9
|
||||
} // namespace BlackCore
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
#include "simulatorfsxfactory.h"
|
||||
#include "simulatorfsx.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include <QTimer>
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
|
||||
@@ -10,16 +10,15 @@
|
||||
#include "simulatorp3dfactory.h"
|
||||
#include "simulatorp3d.h"
|
||||
#include "blackmisc/simulation/simulatorplugininfo.h"
|
||||
#include <QTimer>
|
||||
|
||||
namespace BlackSimPlugin
|
||||
{
|
||||
namespace P3D
|
||||
{
|
||||
BlackCore::ISimulator *CSimulatorP3DFactory::create(const BlackMisc::Simulation::CSimulatorPluginInfo &info,
|
||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
|
||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider)
|
||||
BlackMisc::Simulation::IOwnAircraftProvider *ownAircraftProvider,
|
||||
BlackMisc::Simulation::IRemoteAircraftProvider *remoteAircraftProvider,
|
||||
BlackMisc::Weather::IWeatherGridProvider *weatherGridProvider)
|
||||
{
|
||||
Q_ASSERT(ownAircraftProvider);
|
||||
return new CSimulatorP3D(info, ownAircraftProvider, remoteAircraftProvider, weatherGridProvider, this);
|
||||
@@ -29,6 +28,5 @@ namespace BlackSimPlugin
|
||||
{
|
||||
return new CSimulatorP3DListener(info);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user