mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[host] nvfbc: remove the frameEvent
event and associated code
Now that the host application can run the capture interface in synchronous mode, and NVFBC uses this mode there is no longer need for the frameEvent.
This commit is contained in:
parent
e477663a7e
commit
7d0b9711bd
@ -57,7 +57,6 @@ struct iface
|
|||||||
|
|
||||||
NvFBCFrameGrabInfo grabInfo;
|
NvFBCFrameGrabInfo grabInfo;
|
||||||
|
|
||||||
LGEvent * frameEvent;
|
|
||||||
LGEvent * cursorEvent;
|
LGEvent * cursorEvent;
|
||||||
|
|
||||||
int mouseX, mouseY, mouseHotX, mouseHotY;
|
int mouseX, mouseY, mouseHotX, mouseHotY;
|
||||||
@ -134,13 +133,6 @@ static bool nvfbc_create(
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
this = (struct iface *)calloc(sizeof(struct iface), 1);
|
this = (struct iface *)calloc(sizeof(struct iface), 1);
|
||||||
this->frameEvent = lgCreateEvent(true, 17);
|
|
||||||
if (!this->frameEvent)
|
|
||||||
{
|
|
||||||
DEBUG_ERROR("failed to create the frame event");
|
|
||||||
nvfbc_free();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
this->seperateCursor = option_get_bool("nvfbc", "decoupleCursor");
|
||||||
this->getPointerBufferFn = getPointerBufferFn;
|
this->getPointerBufferFn = getPointerBufferFn;
|
||||||
@ -186,7 +178,6 @@ static bool nvfbc_init(void)
|
|||||||
free(privData);
|
free(privData);
|
||||||
|
|
||||||
getDesktopSize(&this->width, &this->height, &this->dpi);
|
getDesktopSize(&this->width, &this->height, &this->dpi);
|
||||||
lgResetEvent(this->frameEvent);
|
|
||||||
|
|
||||||
HANDLE event;
|
HANDLE event;
|
||||||
if (!NvFBCToSysSetup(
|
if (!NvFBCToSysSetup(
|
||||||
@ -239,7 +230,6 @@ static void nvfbc_stop(void)
|
|||||||
this->stop = true;
|
this->stop = true;
|
||||||
|
|
||||||
lgSignalEvent(this->cursorEvent);
|
lgSignalEvent(this->cursorEvent);
|
||||||
lgSignalEvent(this->frameEvent);
|
|
||||||
|
|
||||||
if (this->pointerThread)
|
if (this->pointerThread)
|
||||||
{
|
{
|
||||||
@ -262,9 +252,6 @@ static bool nvfbc_deinit(void)
|
|||||||
|
|
||||||
static void nvfbc_free(void)
|
static void nvfbc_free(void)
|
||||||
{
|
{
|
||||||
if (this->frameEvent)
|
|
||||||
lgFreeEvent(this->frameEvent);
|
|
||||||
|
|
||||||
if (this->mouseHookCreated)
|
if (this->mouseHookCreated)
|
||||||
mouseHook_remove();
|
mouseHook_remove();
|
||||||
|
|
||||||
@ -313,16 +300,12 @@ done:
|
|||||||
return CAPTURE_RESULT_TIMEOUT;
|
return CAPTURE_RESULT_TIMEOUT;
|
||||||
|
|
||||||
memcpy(&this->grabInfo, &grabInfo, sizeof(grabInfo));
|
memcpy(&this->grabInfo, &grabInfo, sizeof(grabInfo));
|
||||||
lgSignalEvent(this->frameEvent);
|
|
||||||
return CAPTURE_RESULT_OK;
|
return CAPTURE_RESULT_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CaptureResult nvfbc_waitFrame(CaptureFrame * frame,
|
static CaptureResult nvfbc_waitFrame(CaptureFrame * frame,
|
||||||
const size_t maxFrameSize)
|
const size_t maxFrameSize)
|
||||||
{
|
{
|
||||||
if (!lgWaitEvent(this->frameEvent, 1000))
|
|
||||||
return CAPTURE_RESULT_TIMEOUT;
|
|
||||||
|
|
||||||
if (this->stop)
|
if (this->stop)
|
||||||
return CAPTURE_RESULT_REINIT;
|
return CAPTURE_RESULT_REINIT;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user