Recording now uses new write
This commit is contained in:
+2
-6
@@ -217,11 +217,7 @@ PLUGIN_API void XPluginStop(void)
|
||||
serverThread.join();
|
||||
recordingThread.join();
|
||||
|
||||
std::ofstream out(XPLANE_PLUGIN_DIRECTORY RECORDING_DIRECTORY "flight.rec",
|
||||
std::fstream::binary);
|
||||
out.write(reinterpret_cast<const char *>(p.getBinaryData()),
|
||||
(std::streamsize)p.getBinaryLength());
|
||||
out.close();
|
||||
p.toFile("flight.rec");
|
||||
}
|
||||
|
||||
PLUGIN_API void XPluginDisable(void) {}
|
||||
@@ -318,7 +314,7 @@ void recordingWorker()
|
||||
{copy.lat, copy.lon});
|
||||
|
||||
if (strcmp(copy.path, "") != 0 && copy.pause && lastPath != currentPath) {
|
||||
p.addSegment(currentPath);
|
||||
p.addEntry(currentPath);
|
||||
lastPath = currentPath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user