From 7018a3e7378e96d5ade0a522892f68ffd982db91 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 12 Apr 2020 13:46:56 +1000 Subject: [PATCH] [c-host] dxgi: close the desktop on deinit --- VERSION | 2 +- c-host/platform/Windows/capture/DXGI/src/dxgi.c | 7 +++++++ client/src/main.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index fdcb6fa2..3da79705 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -B1-167-gdbd7db7787+1 \ No newline at end of file +B1-168-gd3836d4548+1 \ No newline at end of file diff --git a/c-host/platform/Windows/capture/DXGI/src/dxgi.c b/c-host/platform/Windows/capture/DXGI/src/dxgi.c index 2ac62271..3930348b 100644 --- a/c-host/platform/Windows/capture/DXGI/src/dxgi.c +++ b/c-host/platform/Windows/capture/DXGI/src/dxgi.c @@ -612,6 +612,13 @@ static bool dxgi_deinit() } LG_LOCK_FREE(this->deviceContextLock); + + if (this->desktop) + { + CloseDesktop(this->desktop); + this->desktop = NULL; + } + this->initialized = false; return true; } diff --git a/client/src/main.c b/client/src/main.c index bf0d7b59..24cb8879 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1475,7 +1475,7 @@ static int lg_run() if (!lgmpClientSessionValid(state.lgmp)) { DEBUG_WARN("Session is invalid, has the host shutdown?"); - break; + // break; } (void)closeAlert;