[host] app: allow the capture interface to select async or sync mode

While it's correct for DXGI to use a asyncronous waitFrame model, other
capture interfaces such as NvFBC it is not correct. This change allows
the capture interface to specify which is more correct for it and moves
the waitFrame/post into the main thread if async is not desired.
This commit is contained in:
Geoffrey McRae
2021-07-12 16:53:46 +10:00
parent eb01efe0cb
commit e477663a7e
5 changed files with 139 additions and 114 deletions

View File

@@ -91,9 +91,10 @@ typedef void (*CapturePostPointerBuffer)(CapturePointer pointer);
typedef struct CaptureInterface
{
const char *shortName;
const char * (*getName )();
void (*initOptions )();
const char * shortName;
const bool asyncCapture;
const char * (*getName )();
void (*initOptions )();
bool(*create)(
CaptureGetPointerBuffer getPointerBufferFn,