diff options
author | fireice-uk <fireice-uk@users.noreply.github.com> | 2017-12-01 15:13:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 15:13:03 +0000 |
commit | 2920e9a3227da307b04ee23ecc5c63ecee4a224c (patch) | |
tree | cbb1c5f5997dd528519892e04938f9433e42f539 /xmrstak/misc/console.cpp | |
parent | 4f7699eb4574ae89e6299aafc410dcd4143b52e2 (diff) | |
parent | b203d4b43cb498aa7670c091b0d10aea456f24ed (diff) | |
download | xmr-stak-2920e9a3227da307b04ee23ecc5c63ecee4a224c.zip xmr-stak-2920e9a3227da307b04ee23ecc5c63ecee4a224c.tar.gz |
Merge pull request #306 from psychocrypt/topic-noWaitWindows
add environment variable `XMRSTAK_NOWIT`
Diffstat (limited to 'xmrstak/misc/console.cpp')
-rw-r--r-- | xmrstak/misc/console.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmrstak/misc/console.cpp b/xmrstak/misc/console.cpp index 8de5948..980760e 100644 --- a/xmrstak/misc/console.cpp +++ b/xmrstak/misc/console.cpp @@ -222,8 +222,13 @@ void printer::print_str(const char* str) #ifdef _WIN32 void win_exit(size_t code) { - printer::inst()->print_str("Press any key to exit."); - get_key(); + size_t envSize = 0; + getenv_s(&envSize, nullptr, 0, "XMRSTAK_NOWAIT"); + if(envSize == 0) + { + printer::inst()->print_str("Press any key to exit."); + get_key(); + } std::exit(code); } |