mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-14 21:17:54 +00:00
[host] fix hang on capture error
This commit is contained in:
parent
31a25c94c6
commit
9f67f42f94
2 changed files with 5 additions and 1 deletions
|
@ -105,6 +105,7 @@ bool Service::Initialize(ICapture * captureDevice)
|
||||||
|
|
||||||
m_haveFrame = false;
|
m_haveFrame = false;
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
|
m_running = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,6 +139,8 @@ bool Service::InitPointers()
|
||||||
|
|
||||||
void Service::DeInitialize()
|
void Service::DeInitialize()
|
||||||
{
|
{
|
||||||
|
m_running = false;
|
||||||
|
|
||||||
WaitForSingleObject(m_cursorThread, INFINITE);
|
WaitForSingleObject(m_cursorThread, INFINITE);
|
||||||
CloseHandle(m_cursorThread);
|
CloseHandle(m_cursorThread);
|
||||||
CloseHandle(m_cursorEvent);
|
CloseHandle(m_cursorEvent);
|
||||||
|
@ -335,7 +338,7 @@ bool Service::Process()
|
||||||
|
|
||||||
DWORD Service::CursorThread()
|
DWORD Service::CursorThread()
|
||||||
{
|
{
|
||||||
while(m_capture)
|
while(m_running)
|
||||||
{
|
{
|
||||||
if (WaitForSingleObject(m_cursorEvent, 1000) != WAIT_OBJECT_0)
|
if (WaitForSingleObject(m_cursorEvent, 1000) != WAIT_OBJECT_0)
|
||||||
continue;
|
continue;
|
||||||
|
|
|
@ -53,6 +53,7 @@ private:
|
||||||
~Service();
|
~Service();
|
||||||
|
|
||||||
bool m_initialized;
|
bool m_initialized;
|
||||||
|
bool m_running;
|
||||||
DWORD m_consoleSessionID;
|
DWORD m_consoleSessionID;
|
||||||
uint8_t * m_memory;
|
uint8_t * m_memory;
|
||||||
IVSHMEM * m_ivshmem;
|
IVSHMEM * m_ivshmem;
|
||||||
|
|
Loading…
Reference in a new issue