[host] nvfbc: disable pointerThread when unused

fixes log spam that would occur when decoupleCursor=false
This commit is contained in:
arcnmx 2021-07-25 22:14:10 -07:00 committed by Geoffrey McRae
parent 03ed8b7304
commit c0aec7d8f4

View File

@ -239,7 +239,7 @@ static bool nvfbc_init(void)
Sleep(100); Sleep(100);
if (!lgCreateThread("NvFBCPointer", pointerThread, NULL, &this->pointerThread)) if (this->seperateCursor && !lgCreateThread("NvFBCPointer", pointerThread, NULL, &this->pointerThread))
{ {
DEBUG_ERROR("Failed to create the NvFBCPointer thread"); DEBUG_ERROR("Failed to create the NvFBCPointer thread");
nvfbc_deinit(); nvfbc_deinit();
@ -254,6 +254,8 @@ static void nvfbc_stop(void)
{ {
this->stop = true; this->stop = true;
if (this->seperateCursor)
{
lgSignalEvent(this->cursorEvent); lgSignalEvent(this->cursorEvent);
if (this->pointerThread) if (this->pointerThread)
@ -261,6 +263,7 @@ static void nvfbc_stop(void)
lgJoinThread(this->pointerThread, NULL); lgJoinThread(this->pointerThread, NULL);
this->pointerThread = NULL; this->pointerThread = NULL;
} }
}
} }
static bool nvfbc_deinit(void) static bool nvfbc_deinit(void)