mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T650, save FSX/P3D specific settings
This commit is contained in:
@@ -338,6 +338,15 @@ namespace BlackSimPlugin
|
||||
m_traceAutoUntilTs = -1;
|
||||
}
|
||||
|
||||
void CSimulatorFsxCommon::setAddingAsSimulatedObjectEnabled(bool enabled)
|
||||
{
|
||||
m_useAddSimulatedObj = enabled;
|
||||
const CSimulatorInfo sim = this->getSimulatorInfo();
|
||||
CFsxP3DSettings settings = m_detailsSettings.getSettings(sim);
|
||||
settings.setAddingAsSimulatedObjectEnabled(enabled);
|
||||
m_detailsSettings.setSettings(settings, sim);
|
||||
}
|
||||
|
||||
void CSimulatorFsxCommon::resetAircraftStatistics()
|
||||
{
|
||||
m_dispatchProcCount = 0;
|
||||
@@ -439,7 +448,9 @@ namespace BlackSimPlugin
|
||||
if (m_simSimulating) { return; } // already simulatig
|
||||
if (referenceTs != m_simulatingChangedTs) { return; } // changed, so no longer valid
|
||||
m_simSimulating = true; // only place where this should be set to true
|
||||
m_simConnected = true;
|
||||
m_simConnected = true;
|
||||
m_useAddSimulatedObj = m_detailsSettings.getSettings(this->getSimulatorInfo()).isAddingAsSimulatedObjectEnabled();
|
||||
|
||||
HRESULT hr1 = this->logAndTraceSendId(
|
||||
SimConnect_RequestDataOnSimObject(m_hSimConnect, CSimConnectDefinitions::RequestOwnAircraft,
|
||||
CSimConnectDefinitions::DataOwnAircraft, SIMCONNECT_OBJECT_ID_USER, SIMCONNECT_PERIOD_VISUAL_FRAME),
|
||||
|
||||
@@ -186,7 +186,7 @@ namespace BlackSimPlugin
|
||||
bool isAddingAsSimulatedObjectEnabled() const { return m_useAddSimulatedObj; }
|
||||
|
||||
//! Allow adding as simulated object instead of non ATC
|
||||
void setAddingAsSimulatedObjectEnabled(bool enabled) { m_useAddSimulatedObj = enabled; }
|
||||
void setAddingAsSimulatedObjectEnabled(bool enabled);
|
||||
|
||||
//! Request for sim data (request in range of sim data)?
|
||||
static bool isRequestForSimObjAircraft(DWORD requestId) { return requestId >= RequestSimObjAircraftStart && requestId <= RequestSimObjAircraftRangeEnd; }
|
||||
@@ -609,6 +609,9 @@ namespace BlackSimPlugin
|
||||
int m_receiveExceptionCount = 0; //!< exceptions
|
||||
int m_requestSimObjectDataCount = 0; //!< requested SimObjects
|
||||
|
||||
// settings
|
||||
BlackMisc::Simulation::Settings::CMultiSimulatorDetailsSettings m_detailsSettings;
|
||||
|
||||
// objects
|
||||
CSimConnectObjects m_simConnectObjectsPositionAndPartsTraces; //!< position/parts received, but object not yet added, excluded, disabled etc.
|
||||
CSimConnectObjects m_addPendingAircraft; //!< aircraft/probes awaiting to be added;
|
||||
|
||||
Reference in New Issue
Block a user