From 15353a1f1d6b016f4cf9ac5006dde5cb115277f4 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Tue, 24 Mar 2020 18:26:03 +0100 Subject: [PATCH] Based on the Linux crash, already added some newer SIMS --- src/blackcore/fsd/enums.h | 3 +++ src/blackcore/fsd/serializer.cpp | 24 +++++++++++++++--------- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/blackcore/fsd/enums.h b/src/blackcore/fsd/enums.h index 2a17cdea5..8a12ae8c1 100644 --- a/src/blackcore/fsd/enums.h +++ b/src/blackcore/fsd/enums.h @@ -59,14 +59,17 @@ namespace BlackCore MSCFS3, /*!< MS Combat Flight Simulator 3 */ MSFS2004, /*!< MS Flight Simulator 2004 */ MSFSX, /*!< MS Flight Simulator X */ + MSFS2020, /*!< MS Flight Simulator 2020 */ XPLANE8, /*!< X-Plane 8 */ XPLANE9, /*!< X-Plane 9 */ XPLANE10, /*!< X-Plane 10 */ XPLANE11, /*!< X-Plane 11 */ + XPLANE12, /*!< X-Plane 12 */ P3Dv1, /*!< Prepar3D V1 */ P3Dv2, /*!< Prepar3D V2 */ P3Dv3, /*!< Prepar3D V3 */ P3Dv4, /*!< Prepar3D V4 */ + P3Dv5, /*!< Prepar3D V5 */ FlightGear /*!< Flight Gear */ }; diff --git a/src/blackcore/fsd/serializer.cpp b/src/blackcore/fsd/serializer.cpp index cd31cea34..52923d0e6 100644 --- a/src/blackcore/fsd/serializer.cpp +++ b/src/blackcore/fsd/serializer.cpp @@ -128,6 +128,12 @@ namespace BlackCore case SimType::P3Dv2: return "30"; case SimType::P3Dv3: return "30"; case SimType::P3Dv4: return "30"; + + // future versions + case SimType::XPLANE12: + case SimType::P3Dv5: + case SimType::MSFS2020: + return "0"; } Q_UNREACHABLE(); @@ -142,15 +148,15 @@ namespace BlackCore // valid types if (str == "0") return SimType::Unknown; - else if (str == "1") return SimType::MSFS95; - else if (str == "2") return SimType::MSFS98; - else if (str == "3") return SimType::MSCFS; - else if (str == "4") return SimType::MSFS2000; - else if (str == "5") return SimType::MSCFS2; - else if (str == "6") return SimType::MSFS2002; - else if (str == "7") return SimType::MSCFS3; - else if (str == "8") return SimType::MSFS2004; - else if (str == "9") return SimType::MSFSX; + else if (str == "1") return SimType::MSFS95; + else if (str == "2") return SimType::MSFS98; + else if (str == "3") return SimType::MSCFS; + else if (str == "4") return SimType::MSFS2000; + else if (str == "5") return SimType::MSCFS2; + else if (str == "6") return SimType::MSFS2002; + else if (str == "7") return SimType::MSCFS3; + else if (str == "8") return SimType::MSFS2004; + else if (str == "9") return SimType::MSFSX; else if (str == "12") return SimType::XPLANE8; else if (str == "13") return SimType::XPLANE9; else if (str == "14") return SimType::XPLANE10;