Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
Z-Dante committed Dec 28, 2021
2 parents c0f8541 + 0165240 commit 49aebc0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Runtime/App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,16 @@ bool App::_DisableDirectFlip() {
SPDLOG_LOGGER_ERROR(logger, MakeWin32ErrorMsg("SetLayeredWindowAttributes 失败"));
}

if (_captureMode == 0 || _captureMode == 1) {
const RTL_OSVERSIONINFOW& version = Utils::GetOSVersion();
if (Utils::CompareVersion(version.dwMajorVersion, version.dwMinorVersion, version.dwBuildNumber, 10, 0, 19041) >= 0) {
// 使 DDF 窗口无法被捕获到
if (!SetWindowDisplayAffinity(_hwndDDF, WDA_EXCLUDEFROMCAPTURE)) {
SPDLOG_LOGGER_ERROR(logger, MakeWin32ErrorMsg("SetWindowDisplayAffinity 失败"));
}
}
}

if (!ShowWindow(_hwndDDF, SW_NORMAL)) {
SPDLOG_LOGGER_ERROR(logger, MakeWin32ErrorMsg("ShowWindow 失败"));
}
Expand Down

0 comments on commit 49aebc0

Please sign in to comment.