From 58ef035603b8e3bf9299b4bddcdebcc653ea8810 Mon Sep 17 00:00:00 2001
From: SineStriker <trueful@163.com>
Date: 周五, 29 12月 2023 11:50:33 +0800
Subject: [PATCH] Window bar support I18N

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

diff --git a/src/core/qwindowkit_windows.cpp b/src/core/qwindowkit_windows.cpp
index c8f8c2d..8292de5 100644
--- a/src/core/qwindowkit_windows.cpp
+++ b/src/core/qwindowkit_windows.cpp
@@ -1 +1,25 @@
 #include "qwindowkit_windows.h"
+
+namespace QWK {
+
+    static RTL_OSVERSIONINFOW GetRealOSVersionImpl() {
+        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;
+    }
+
+    namespace Private {
+
+        RTL_OSVERSIONINFOW GetRealOSVersion() {
+            static const auto result = GetRealOSVersionImpl();
+            return result;
+        }
+
+    }
+
+}
\ No newline at end of file

--
Gitblit v1.9.1