mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
refactor: 优化操作系统版本检测
This commit is contained in:
parent
d0301685f0
commit
21e07884cc
17 changed files with 94 additions and 98 deletions
|
|
@ -228,9 +228,8 @@ bool GraphicsCaptureFrameSource::_CaptureFromStyledWindow(IGraphicsCaptureItemIn
|
|||
}
|
||||
|
||||
bool GraphicsCaptureFrameSource::_CaptureFromMonitor(IGraphicsCaptureItemInterop* interop) {
|
||||
// WDA_EXCLUDEFROMCAPTURE 只在 Win10 v2004 及更新版本中可用
|
||||
const RTL_OSVERSIONINFOW& version = Win32Utils::GetOSVersion();
|
||||
if (Utils::CompareVersion(version.dwMajorVersion, version.dwMinorVersion, version.dwBuildNumber, 10, 0, 19041) < 0) {
|
||||
// WDA_EXCLUDEFROMCAPTURE 只在 Win10 20H1 及更新版本中可用
|
||||
if (!Win32Utils::GetOSVersion().Is20H1OrNewer()) {
|
||||
Logger::Get().Error("当前操作系统无法使用全屏捕获");
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue