aboutsummaryrefslogtreecommitdiff
path: root/vulkaninfo/vulkaninfo.cpp
diff options
context:
space:
mode:
authorCharles Giessen <charles@lunarg.com>2019-10-30 16:44:04 -0600
committerCharles Giessen <46324611+charles-lunarg@users.noreply.github.com>2019-10-30 17:45:09 -0600
commit0c2f51dc7a971b94c23db3022c16e235da1f214e (patch)
treeebd3ff9d473a456f31b6b1938103abfbaec1e593 /vulkaninfo/vulkaninfo.cpp
parentb13baa7080a19aa797f4b3b1bf905484d9ee174d (diff)
downloadusermoji-0c2f51dc7a971b94c23db3022c16e235da1f214e.tar.xz
vulkaninfo: fix infinite sleep for non text outputs
Previous versions, in win32 would sleep infinitely if a crash occured. This commit will first check if its a text output first before sleeping, to preserve the error if it is in a console but return immediate if it isn't. Change-Id: Ib1b43001e970c8c3114e666d96b24dc3c557a579
Diffstat (limited to 'vulkaninfo/vulkaninfo.cpp')
-rw-r--r--vulkaninfo/vulkaninfo.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/vulkaninfo/vulkaninfo.cpp b/vulkaninfo/vulkaninfo.cpp
index 71be8c4d..f12b370f 100644
--- a/vulkaninfo/vulkaninfo.cpp
+++ b/vulkaninfo/vulkaninfo.cpp
@@ -676,11 +676,7 @@ int main(int argc, char **argv) {
if (ConsoleIsExclusive()) ConsoleEnlarge();
#endif
- bool human_readable_output = true;
- bool html_output = false;
- bool json_output = false;
uint32_t selected_gpu = 0;
- bool show_formats = false;
// Combinations of output: html only, html AND json, json only, human readable only
for (int i = 1; i < argc; ++i) {
@@ -791,11 +787,7 @@ int main(int argc, char **argv) {
}
#endif
-#ifdef _WIN32
- if (ConsoleIsExclusive()) {
- Sleep(INFINITE);
- }
-#endif
+ WAIT_FOR_CONSOLE_DESTROY;
return 0;
}