Version
Global AP
This commit is contained in:
parent
752646c744
commit
2510f4968c
@ -11,8 +11,12 @@ std::thread recordingThread;
|
|||||||
std::atomic<bool> wantsExit;
|
std::atomic<bool> wantsExit;
|
||||||
|
|
||||||
std::map<std::string, std::string> configuration;
|
std::map<std::string, std::string> configuration;
|
||||||
|
std::map<std::string,
|
||||||
|
std::pair<std::vector<germanairlinesva_simdata::Gate>,
|
||||||
|
std::vector<germanairlinesva_simdata::Runway>>>
|
||||||
|
airports;
|
||||||
germanairlinesva_websocket::Websocket *connector;
|
germanairlinesva_websocket::Websocket *connector;
|
||||||
|
int xplaneVersion;
|
||||||
|
|
||||||
/* Datarefs */
|
/* Datarefs */
|
||||||
XPLMDataRef pauseIndicator;
|
XPLMDataRef pauseIndicator;
|
||||||
@ -52,6 +56,9 @@ Path p;
|
|||||||
PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
|
PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
|
||||||
{
|
{
|
||||||
XPLMEnableFeature("XPLM_USE_NATIVE_PATHS", 1);
|
XPLMEnableFeature("XPLM_USE_NATIVE_PATHS", 1);
|
||||||
|
XPLMGetVersions(&xplaneVersion, NULL, NULL);
|
||||||
|
|
||||||
|
toLog("Plugin using X-Plane Version " + std::to_string(xplaneVersion));
|
||||||
|
|
||||||
wantsExit.store(false);
|
wantsExit.store(false);
|
||||||
|
|
||||||
@ -126,10 +133,6 @@ PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
|
|||||||
if (germanairlinesva_util::generateMD5("Custom Scenery/scenery_packs.ini",
|
if (germanairlinesva_util::generateMD5("Custom Scenery/scenery_packs.ini",
|
||||||
hash,
|
hash,
|
||||||
toLog) == 0) {
|
toLog) == 0) {
|
||||||
std::map<std::string,
|
|
||||||
std::pair<std::vector<germanairlinesva_simdata::Gate>,
|
|
||||||
std::vector<germanairlinesva_simdata::Runway>>>
|
|
||||||
airports;
|
|
||||||
|
|
||||||
if (strcmp(configuration["scenery"].c_str(), hash) != 0 ||
|
if (strcmp(configuration["scenery"].c_str(), hash) != 0 ||
|
||||||
!germanairlinesva_util::fileExists(
|
!germanairlinesva_util::fileExists(
|
||||||
@ -163,7 +166,7 @@ PLUGIN_API int XPluginStart(char *outName, char *outSig, char *outDesc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thread for sending data to web socket
|
// Thread for sending data to websocket
|
||||||
serverThread = std::thread(&serverWorker);
|
serverThread = std::thread(&serverWorker);
|
||||||
recordingThread = std::thread(&recordingWorker);
|
recordingThread = std::thread(&recordingWorker);
|
||||||
toLog("Workers started");
|
toLog("Workers started");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user