From 37eb6b6b032bd93a3ae07f65bba03332e2ca9718 Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Thu, 30 Apr 2015 13:53:02 -0700 Subject: [PATCH] Added X-Plane version information to the XPC log file. --- xpcPlugin/Log.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xpcPlugin/Log.cpp b/xpcPlugin/Log.cpp index c08de8d..77943fa 100644 --- a/xpcPlugin/Log.cpp +++ b/xpcPlugin/Log.cpp @@ -1,6 +1,9 @@ //Copyright (c) 2013-2015 United States Government as represented by the Administrator of the //National Aeronautics and Space Administration. All Rights Reserved. #include "Log.h" + +#include "XPLMUtilities.h" + #include #include #include @@ -51,6 +54,13 @@ namespace XPC fprintf(fd, "an issue on GitHub (https://github.com/nasa/XPlaneConnect/issues) or by\n"); fprintf(fd, "emailing Christopher Teubert (christopher.a.teubert@nasa.gov).\n\n"); + int xpVer; + int xplmVer; + XPLMHostApplicationID hostID; + XPLMGetVersions(&xpVer, &xplmVer, &hostID); + fprintf(fd, "X-Plane Version: %d\n", xpVer); + fprintf(fd, "Plugin Manager Version: %d\n", xplmVer); + fprintf(fd, "Host Application ID: %d\n", hostID); fprintf(fd, "Log file generated on %s.\n", timeStr); fclose(fd); }