From fe6fb8ef5f41891809a0c76848c59b4753e07bb6 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <2546789017@qq.com> Date: Wed, 19 Oct 2022 17:15:23 +0800 Subject: [PATCH] win: add new win10 subver Signed-off-by: Yuhang Zhao <2546789017@qq.com> --- .../Core/framelesshelpercore_global.h | 17 +++++++++-------- .../Core/private/winverhelper_p.h | 1 + .../Quick/framelesshelperquick_global.h | 5 ++++- src/core/winverhelper.cpp | 2 ++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/include/FramelessHelper/Core/framelesshelpercore_global.h b/include/FramelessHelper/Core/framelesshelpercore_global.h index 21ec377..83256cf 100644 --- a/include/FramelessHelper/Core/framelesshelpercore_global.h +++ b/include/FramelessHelper/Core/framelesshelpercore_global.h @@ -323,9 +323,10 @@ enum class WindowsVersion _10_20H2 = 21, _10_21H1 = 22, _10_21H2 = 23, + _10_22H2 = 24, _10 = _10_1507, - _11_21H2 = 24, - _11_22H2 = 25, + _11_21H2 = 25, + _11_22H2 = 26, _11 = _11_21H2, Latest = _11_22H2 }; @@ -380,11 +381,10 @@ Q_ENUM_NS(RegistryRootKey) enum class WindowEdge { - Unspecified = 0x00000000, - Left = 0x00000001, - Top = 0x00000002, - Right = 0x00000004, - Bottom = 0x00000008 + Left = 0x00000000, + Top = 0x00000001, + Right = 0x00000002, + Bottom = 0x00000004 }; Q_ENUM_NS(WindowEdge) Q_DECLARE_FLAGS(WindowEdges, WindowEdge) @@ -576,8 +576,9 @@ struct SystemParameters {10, 0, 19042}, // Windows 10 Version 20H2 (October 2020 Update) (20H2) {10, 0, 19043}, // Windows 10 Version 21H1 (May 2021 Update) (21H1) {10, 0, 19044}, // Windows 10 Version 21H2 (November 2021 Update) (21H2) + {10, 0, 19045}, // Windows 10 Version 22H2 (October 2022 Update) (22H2) {10, 0, 22000}, // Windows 11 Version 21H2 (21H2) - {10, 0, 22621}, // Windows 11 Version 22H2 (22H2) + {10, 0, 22621} // Windows 11 Version 22H2 (October 2022 Update) (22H2) }; #endif // Q_OS_WINDOWS diff --git a/include/FramelessHelper/Core/private/winverhelper_p.h b/include/FramelessHelper/Core/private/winverhelper_p.h index ae8a46f..948910b 100644 --- a/include/FramelessHelper/Core/private/winverhelper_p.h +++ b/include/FramelessHelper/Core/private/winverhelper_p.h @@ -58,6 +58,7 @@ DECL(1020H1) DECL(1020H2) DECL(1021H1) DECL(1021H2) +DECL(1022H2) DECL(11) DECL(1121H2) DECL(1122H2) diff --git a/include/FramelessHelper/Quick/framelesshelperquick_global.h b/include/FramelessHelper/Quick/framelesshelperquick_global.h index fd390f6..eed453a 100644 --- a/include/FramelessHelper/Quick/framelesshelperquick_global.h +++ b/include/FramelessHelper/Quick/framelesshelperquick_global.h @@ -139,6 +139,7 @@ public: FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _2000) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _XP) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _XP_64) + FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _WS_03) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _Vista) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _Vista_SP1) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _Vista_SP2) @@ -160,8 +161,11 @@ public: FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _10_20H2) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _10_21H1) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _10_21H2) + FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _10_22H2) + FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _10) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _11_21H2) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _11_22H2) + FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, _11) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowsVersion, Latest) }; Q_ENUM(WindowsVersion) @@ -187,7 +191,6 @@ public: enum class WindowEdge { - FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowEdge, Unspecified) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowEdge, Left) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowEdge, Top) FRAMELESSHELPER_QUICK_ENUM_VALUE(WindowEdge, Right) diff --git a/src/core/winverhelper.cpp b/src/core/winverhelper.cpp index ca2d1d0..943d19c 100644 --- a/src/core/winverhelper.cpp +++ b/src/core/winverhelper.cpp @@ -76,6 +76,7 @@ void WinVerHelper::initialize() if (false) { /* Dummy */ } ELIF(11_22H2) ELIF(11_21H2) + ELIF(10_22H2) ELIF(10_21H2) ELIF(10_21H1) ELIF(10_20H2) @@ -138,6 +139,7 @@ IMPL(1020H1, 10_2004) IMPL(1020H2, 10_20H2) IMPL(1021H1, 10_21H1) IMPL(1021H2, 10_21H2) +IMPL(1022H2, 10_22H2) IMPL(11, 11) IMPL(1121H2, 11_21H2) IMPL(1122H2, 11_22H2)