From 043be5ba6d70a7107dfa82b30988f26a802543fb Mon Sep 17 00:00:00 2001 From: killcerr <93478098+killcerr@users.noreply.github.com> Date: Sat, 29 Jun 2024 10:23:14 +0800 Subject: [PATCH] fix: get_opacity --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index e2337ae..332ff61 100644 --- a/main.cpp +++ b/main.cpp @@ -124,7 +124,7 @@ BYTE get_opacity(HWND window) { COLORREF key; BYTE alpha; DWORD falgs; - GetLayeredWindowAttributes(window, &key, &alpha, &falgs); + if (GetLayeredWindowAttributes(window, &key, &alpha, &falgs) == 0) return 255; return alpha; }