Skip to content

Commit 7a49cc2

Browse files
committed
添加最低版本的检查
1 parent fc66de0 commit 7a49cc2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

src/Snap.Hutao.Remastered.Native/HutaoNative.cpp

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,16 @@ HRESULT __stdcall HutaoNative::IsCurrentWindowsVersionSupported(BOOL* isSupporte
160160
{
161161
AssertNonNullAndReturn(isSupported);
162162

163-
// Simple implementation: always return TRUE (supported)
164-
// Actual implementation should check Windows version
165-
*isSupported = TRUE;
163+
HutaoPrivateWindowsVersion winver;
164+
GetWindowsVersion(&winver);
165+
166+
if (winver.major >= 10 && winver.minor >= 0 && winver.build >= 19045 && winver.revision >= 5371)
167+
{
168+
*isSupported = TRUE;
169+
return S_OK;
170+
}
171+
172+
*isSupported = FALSE;
166173
return S_OK;
167174
}
168175

0 commit comments

Comments
 (0)