vulkaninfo: Fix closing immediately on windows
authorCharles Giessen <charles@lunarg.com>
Mon, 7 Oct 2019 22:53:36 +0000 (16:53 -0600)
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>
Tue, 8 Oct 2019 19:45:40 +0000 (13:45 -0600)
On windows the console window will immediately close after running
vulkaninfo, this fixes it.

Change-Id: Ic5a86ffb89508d874d9609ed1b4d9222a31798c4

vulkaninfo/vulkaninfo.cpp

index 32bda18..1cd35c0 100644 (file)
@@ -750,5 +750,11 @@ int main(int argc, char **argv) {
     }
 #endif
 
+#ifdef _WIN32
+    if (ConsoleIsExclusive()) {
+        Sleep(INFINITE);
+    }
+#endif
+
     return 0;
 }