Skip to content

Commit 121f853

Browse files
committed
removed admin check popup
1 parent 29cc40b commit 121f853

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

AutoLightingOSC-CPP/Main.cpp

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -250,30 +250,6 @@ struct AppState {
250250
// Initialize Windows Graphics Capture
251251
windowsGraphicsCapture->SetDevice(g_pd3dDevice, g_pd3dDeviceContext);
252252
windowsGraphicsCapture->StartCaptureWindow(targetWindowHandle);
253-
254-
// Check if the current process has admin privileges
255-
BOOL isAdmin = FALSE;
256-
HANDLE hToken = NULL;
257-
if (OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, &hToken)) {
258-
TOKEN_ELEVATION elevation;
259-
DWORD size = sizeof(TOKEN_ELEVATION);
260-
if (GetTokenInformation(hToken, TokenElevation, &elevation, sizeof(elevation), &size)) {
261-
isAdmin = elevation.TokenIsElevated;
262-
}
263-
CloseHandle(hToken);
264-
}
265-
266-
if (!isAdmin) {
267-
// Show a warning only once per session
268-
static bool warningShown = false;
269-
if (!warningShown) {
270-
MessageBoxA(nullptr,
271-
"Windows Capture mode may require administrator privileges.\n\n"
272-
"If capture appears black, try running the application as administrator.",
273-
"Warning", MB_OK | MB_ICONINFORMATION);
274-
warningShown = true;
275-
}
276-
}
277253
}
278254

279255
isCapturing = true;

0 commit comments

Comments
 (0)