diff options
| -rw-r--r-- | src/main.cpp | 6 | ||||
| -rw-r--r-- | src/shared/util.cpp | 14 | ||||
| -rw-r--r-- | src/shared/util.h | 1 |
3 files changed, 18 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 75148c4b..e43ec6d0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -472,12 +472,14 @@ int runApplication(MOApplication &application, SingleInstance &instance, qInfo().nospace().noquote() << "windows: " << env.windowsVersion().toString(); + if (env.windowsVersion().compatibilityMode()) { + qWarning() << "MO seems to be running in compatibility mode"; + } + qInfo() << "modules loaded in process:"; for (const auto& m : env.loadedModules()) { qInfo().nospace().noquote() << " . " << m.toString(); } - - return 0; } QString dataPath = application.property("dataPath").toString(); diff --git a/src/shared/util.cpp b/src/shared/util.cpp index 9337ebf6..33094eff 100644 --- a/src/shared/util.cpp +++ b/src/shared/util.cpp @@ -653,6 +653,18 @@ WindowsVersion::WindowsVersion() : getElevated();
}
+bool WindowsVersion::compatibilityMode() const
+{
+ if (m_realMajor == 0 && m_realMinor == 0 && m_realBuild == 0) {
+ return false;
+ }
+
+ return
+ m_realMajor != m_major ||
+ m_realMinor != m_minor ||
+ m_realBuild != m_build;
+}
+
QString WindowsVersion::toString() const
{
QStringList sl;
@@ -665,7 +677,7 @@ QString WindowsVersion::toString() const sl.push_back("version: " + version);
- if (m_realMajor != m_major || m_realMinor != m_minor || m_realBuild != m_build) {
+ if (compatibilityMode()) {
sl.push_back("real version: " + realVersion);
}
diff --git a/src/shared/util.h b/src/shared/util.h index deaf6fcc..232a97bb 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -97,6 +97,7 @@ class WindowsVersion public:
WindowsVersion();
+ bool compatibilityMode() const;
QString toString() const;
private:
|
