From 3e3521b9e170ff92df9be15d6757057549f2888d Mon Sep 17 00:00:00 2001 From: jp9000 Date: Mon, 10 Feb 2020 20:39:48 -0800 Subject: [PATCH] win-capture/graphics-hook: Fix OBS detection Fixes where the graphics hook would try to detect if OBS is currently active or not. --- plugins/win-capture/graphics-hook/graphics-hook.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/plugins/win-capture/graphics-hook/graphics-hook.h b/plugins/win-capture/graphics-hook/graphics-hook.h index e6d13d49d..ba6e0315c 100644 --- a/plugins/win-capture/graphics-hook/graphics-hook.h +++ b/plugins/win-capture/graphics-hook/graphics-hook.h @@ -150,11 +150,7 @@ static inline bool capture_alive(void) { HANDLE handle = OpenMutexW(SYNCHRONIZE, false, keepalive_name); CloseHandle(handle); - - if (handle) - return true; - - return GetLastError() != ERROR_FILE_NOT_FOUND; + return handle != NULL && handle != INVALID_HANDLE_VALUE; } static inline bool capture_active(void)