win-capture/graphics-hook: Fix OBS detection

Fixes where the graphics hook would try to detect if OBS is currently
active or not.
This commit is contained in:
jp9000
2020-02-28 23:48:11 -08:00
parent ef6a6827f4
commit 3e3521b9e1
@@ -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)