Files
eeee-uploaded-files/IDA/project/PreventScreenshot.cpp
T
2026-03-08 16:19:24 -06:00

33 lines
794 B
C++

#include "PreventScreenshot.h"
#include "helpers.h"
PreventScreenshotModule::PreventScreenshotModule()
: BaseModule("PreventScreenshot", "Prevent Screenshot", ModuleCategory::Visual) {}
void PreventScreenshotModule::RegisterTab() {
}
void PreventScreenshotModule::Render() {
if (!ImGui::CollapsingHeader(Tr("Prevent Screenshot"), ImGuiTreeNodeFlags_DefaultOpen)) {
return;
}
bool enabled = Enabled();
if (ImGui::Checkbox(Tr("ON / OFF"), &enabled)) {
SetEnabled(enabled);
}
}
void PreventScreenshotModule::Update() {
if (!g_Runtime.overlay_hwnd) {
return;
}
const DWORD affinity = Enabled()
? (IsWindowsBuildAtLeast(19041) ? 0x11u : 0x1u)
: 0u;
SetWindowDisplayAffinity(g_Runtime.overlay_hwnd, affinity);
}