Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'intern/ghost')
-rw-r--r--intern/ghost/intern/GHOST_SystemWin32.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/intern/ghost/intern/GHOST_SystemWin32.cpp b/intern/ghost/intern/GHOST_SystemWin32.cpp
index 64e1ac3b9b3..923453d6c6f 100644
--- a/intern/ghost/intern/GHOST_SystemWin32.cpp
+++ b/intern/ghost/intern/GHOST_SystemWin32.cpp
@@ -105,6 +105,8 @@
*/
#define BROKEN_PEEK_TOUCHPAD
+static bool isStartedFromCommandPrompt();
+
static void initRawInput()
{
#ifdef WITH_INPUT_NDOF
@@ -166,7 +168,10 @@ GHOST_SystemWin32::~GHOST_SystemWin32()
{
// Shutdown COM
OleUninitialize();
- toggleConsole(1);
+
+ if (isStartedFromCommandPrompt()) {
+ toggleConsole(1);
+ }
}
uint64_t GHOST_SystemWin32::performanceCounterToMillis(__int64 perf_ticks) const