From a5d13e19dd7f6037e10b649c49805922ae5e0fa6 Mon Sep 17 00:00:00 2001
From: SineStriker <trueful@163.com>
Date: 周五, 22 12月 2023 17:04:29 +0800
Subject: [PATCH] Prepare to remove style support again

---
 src/core/qwindowkit_windows.cpp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp
index c8f8c2d..b74167f 100644
--- a/src/core/qwindowkit_windows.cpp
+++ b/src/core/qwindowkit_windows.cpp
@@ -1 +1,18 @@
 #include "qwindowkit_windows.h"
+
+namespace QWK {
+
+    RTL_OSVERSIONINFOW GetRealOSVersion() {
+        static const auto result = []() -> RTL_OSVERSIONINFOW {
+            HMODULE hMod = ::GetModuleHandleW(L"ntdll.dll");
+            using RtlGetVersionPtr = NTSTATUS(WINAPI *)(PRTL_OSVERSIONINFOW);
+            auto pRtlGetVersion = reinterpret_cast<RtlGetVersionPtr>(::GetProcAddress(hMod, "RtlGetVersion"));
+            RTL_OSVERSIONINFOW rovi{};
+            rovi.dwOSVersionInfoSize = sizeof(rovi);
+            pRtlGetVersion(&rovi);
+            return rovi;
+        }();
+        return result;
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.1