[idd] capture: add forced indirect copy
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / idd (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled

This commit is contained in:
Geoffrey McRae
2026-08-17 05:12:05 +10:00
parent 96c3056cc9
commit 2005ea5d69
7 changed files with 73 additions and 2 deletions

View File

@@ -290,3 +290,28 @@ LSTATUS CRegistrySettings::setForceFullDirectCopy(bool forceFullCopy)
return RegSetValueEx(hKey, L"ForceFullDirectCopy", 0, REG_DWORD,
(LPBYTE)&dwValue, sizeof(DWORD));
}
std::optional<bool> CRegistrySettings::getForceIndirectCopy()
{
DWORD result, cbData = sizeof result;
LSTATUS status = RegGetValue(hKey, nullptr, L"ForceIndirectCopy",
RRF_RT_REG_DWORD, nullptr, &result, &cbData);
switch (status)
{
case ERROR_SUCCESS:
return !!result;
case ERROR_FILE_NOT_FOUND:
return false;
default:
DEBUG_ERROR_HR(status, "RegGetValue(ForceIndirectCopy)");
return {};
}
}
LSTATUS CRegistrySettings::setForceIndirectCopy(bool forceIndirectCopy)
{
DWORD dwValue = forceIndirectCopy;
return RegSetValueEx(hKey, L"ForceIndirectCopy", 0, REG_DWORD,
(LPBYTE)&dwValue, sizeof(DWORD));
}