win-capture: Use window for keepalive check

To check to make sure game capture is still active in the capture
program, it currently uses a named event, and then it checks to see if
that named event exists.  However with UWP programs, you can't open a
named event outside of the UWP process.  FindWindow on the other hand
does work, so instead of checking to see if a named kernel object
exists, create a window and check to see if that window exists.
This commit is contained in:
jp9000
2016-10-31 22:30:30 -07:00
parent 1e48b522fa
commit d19342442f
4 changed files with 93 additions and 28 deletions

View File

@@ -13,7 +13,7 @@
#define EVENT_HOOK_READY "CaptureHook_HookReady"
#define EVENT_HOOK_EXIT "CaptureHook_Exit"
#define EVENT_HOOK_KEEPALIVE "CaptureHook_KeepAlive"
#define WINDOW_HOOK_KEEPALIVE L"CaptureHook_KeepAlive"
#define MUTEX_TEXTURE1 "CaptureHook_TextureMutex1"
#define MUTEX_TEXTURE2 "CaptureHook_TextureMutex2"