diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp index 8403955f0..6677def03 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.cpp @@ -2106,7 +2106,7 @@ namespace BlackSimPlugin SIMCONNECT_RECV_OPEN *event = (SIMCONNECT_RECV_OPEN *)pData; simListener->m_simulatorVersion = QString("%1.%2.%3.%4").arg(event->dwApplicationVersionMajor).arg(event->dwApplicationVersionMinor).arg(event->dwApplicationBuildMajor).arg(event->dwApplicationBuildMinor); simListener->m_simConnectVersion = QString("%1.%2.%3.%4").arg(event->dwSimConnectVersionMajor).arg(event->dwSimConnectVersionMinor).arg(event->dwSimConnectBuildMajor).arg(event->dwSimConnectBuildMinor); - simListener->m_simulatorName = QString(event->szApplicationName); + simListener->m_simulatorName = CSimulatorFsxCommon::fsxCharToQString(event->szApplicationName); simListener->m_simulatorDetails = QString("Name: '%1' Version: %2 SimConnect: %3").arg(simListener->m_simulatorName, simListener->m_simulatorVersion, simListener->m_simConnectVersion); CLogMessage(static_cast(nullptr)).info("Connect to %1: '%2'") << simListener->getPluginInfo().getIdentifier() << simListener->backendInfo(); break; diff --git a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h index 06297f81b..462948f74 100644 --- a/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h +++ b/src/plugins/simulator/fsxcommon/simulatorfsxcommon.h @@ -158,6 +158,9 @@ namespace BlackSimPlugin //! \private static DWORD unitTestRequestId(CSimConnectObject::SimObjectType type); + //! Encapsulates creating QString from FSX string data + static QString fsxCharToQString(const char *fsxChar, int size = -1); + protected: //! SimConnect callback //! \note all tasks called in this function (i.e, all called functions) must perform fast or shall be called asynchronously @@ -417,9 +420,6 @@ namespace BlackSimPlugin //! Insert an new SimConnect object CSimConnectObject insertNewSimConnectObject(const BlackMisc::Simulation::CSimulatedAircraft &aircraft, DWORD requestId); - //! Encapsulates creating QString from FSX string data - static QString fsxCharToQString(const char *fsxChar, int size = -1); - static constexpr int GuessRemoteAircraftPartsCycle = 20; //!< guess every n-th cycle static constexpr int SkipUpdateCyclesForCockpit = 10; //!< skip x cycles before updating cockpit again static constexpr int IgnoreReceiveExceptions = 10; //!< skip exceptions when displayed more than x times