mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-05 18:24:08 +00:00
[host] fix faults caused by improper startup/shudown/restart ordering
This commit is contained in:
@@ -211,17 +211,8 @@ static void nvfbc_stop(void)
|
||||
{
|
||||
this->stop = true;
|
||||
|
||||
if (this->cursorEvents[0])
|
||||
{
|
||||
lgSignalEvent(this->cursorEvents[0]);
|
||||
this->cursorEvents[0] = NULL;
|
||||
}
|
||||
|
||||
if (this->frameEvent)
|
||||
{
|
||||
lgSignalEvent(this->frameEvent);
|
||||
this->frameEvent = NULL;
|
||||
}
|
||||
lgSignalEvent(this->cursorEvents[0]);
|
||||
lgSignalEvent(this->frameEvent);
|
||||
|
||||
if (this->pointerThread)
|
||||
{
|
||||
|
@@ -146,6 +146,7 @@ void mouseHook_remove(void)
|
||||
{
|
||||
if (!mouseHook.event)
|
||||
return;
|
||||
|
||||
SetEvent(mouseHook.event);
|
||||
WaitForSingleObject(mouseHook.thread, INFINITE);
|
||||
CloseHandle(mouseHook.thread);
|
||||
|
@@ -146,7 +146,6 @@ static int appThread(void * opaque)
|
||||
int result = app_main(app.argc, app.argv);
|
||||
|
||||
Shell_NotifyIcon(NIM_DELETE, &app.iconData);
|
||||
mouseHook_remove();
|
||||
SendMessage(app.messageWnd, WM_DESTROY, 0, 0);
|
||||
return result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user