Delay the start of XSwiftBus

Starting XSwiftBus in CPlugin constructor called methods that are not
supported during XPluginEnable. Therefore delay the start until X-Plane
is fully loaded.
This commit is contained in:
Roland Winklmeier
2018-10-08 22:16:08 +02:00
parent c683d59994
commit 773a5191a3
2 changed files with 21 additions and 5 deletions

View File

@@ -78,12 +78,14 @@ namespace XSwiftBus
DataRef<xplane::data::sim::flightmodel::position::local_z> m_ownAircraftPositionZ;
std::thread m_dbusThread;
bool m_isRunning = false;
bool m_shouldStop = false;
void readConfig();
void startServer();
void switchToOwnAircraftView();
static float startServerDeferred(float, float, int, void *refcon);
static float flightLoopCallback(float, float, int, void *refcon);
static int orbitOwnAircraftFunc(XPLMCameraPosition_t *cameraPosition, int isLosingControl, void *refcon);
};