diff --git a/src/chrome++.ini b/src/chrome++.ini index f690deb..39b0875 100644 Binary files a/src/chrome++.ini and b/src/chrome++.ini differ diff --git a/src/config.h b/src/config.h index 7eabbb0..f61b30e 100644 --- a/src/config.h +++ b/src/config.h @@ -93,6 +93,12 @@ bool IsShowPassword() { kIniPath.c_str()) != 0; } +// 强制启用 win32k +bool IsWin32K() { + return ::GetPrivateProfileIntW(L"general", L"win32k", 0, kIniPath.c_str()) != + 0; +} + // 保留最后一个标签 bool IsKeepLastTab() { return ::GetPrivateProfileIntW(L"Tabs", L"keep_last_tab", 1, diff --git a/src/green.h b/src/green.h index d8026e6..d55fb8c 100644 --- a/src/green.h +++ b/src/green.h @@ -67,8 +67,10 @@ BOOL WINAPI MyUpdateProcThreadAttribute( PDWORD64 policy_value_1 = &((PDWORD64)lpValue)[0]; *policy_value_1 &= ~static_cast( ProcessCreationMitigationPolicy::BlockNonMicrosoftBinariesAlwaysOn); - // *policy_value_1 &= - // ~PROCESS_CREATION_MITIGATION_POLICY_WIN32K_SYSTEM_CALL_DISABLE_ALWAYS_ON; + if (IsWin32K()) { + *policy_value_1 &= static_cast( + ProcessCreationMitigationPolicy::Win32kSystemCallDisableAlwaysOn); + } } return RawUpdateProcThreadAttribute(lpAttributeList, dwFlags, Attribute, lpValue, cbSize, lpPreviousValue,