From c9a295b092569c89100ec1a80f4f0eed4f52f4c9 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Tue, 1 Sep 2015 09:17:21 -1000 Subject: [PATCH] Added nicer (Y/n) prompt --- hecl/driver/ToolExtract.hpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hecl/driver/ToolExtract.hpp b/hecl/driver/ToolExtract.hpp index 11d637faf..a37086c56 100644 --- a/hecl/driver/ToolExtract.hpp +++ b/hecl/driver/ToolExtract.hpp @@ -3,6 +3,7 @@ #include "ToolBase.hpp" #include +#include class ToolExtract final : public ToolBase { @@ -156,7 +157,7 @@ public: } #if _WIN32 - HECL::Printf(_S("\nContinue? (Y/N) ")); + HECL::Printf(_S("\nContinue? (Y/n) ")); #else if (XTERM_COLOR) HECL::Printf(_S("\n" BLUE BOLD "Continue?" NORMAL " (Y/N) ")); @@ -165,13 +166,14 @@ public: #endif int ch; - while ((ch = getchar())) + while ((ch = getch())) { if (ch == 'n' || ch == 'N') return 0; - if (ch == 'y' || ch == 'Y') + if (ch == 'y' || ch == 'Y' || ch == 13) break; } + HECL::Printf(_S("\n")); for (SpecExtractPass& ds : m_specPasses) {