diff options
author | Nathan Letwory <nathan@letworyinteractive.com> | 2011-04-08 16:49:38 +0400 |
---|---|---|
committer | Nathan Letwory <nathan@letworyinteractive.com> | 2011-04-08 16:49:38 +0400 |
commit | 2b955490795892f702b87247fd5c5f35124b7c1d (patch) | |
tree | 742b1a215e5dfc2a577eec30d12c54cebd6cb2ca /source/blender/blenlib/intern/winstuff.c | |
parent | 0f5959abd9add48ff94d9a627e9897f917cd5cd8 (diff) |
Apply console part of patch [#26044] Windows thumbnails and improved filetype registration
submitted by Tom Edwards
This patch introduces a switch -con and its longer version --start-console. When giving this on cmd-line you'll get the black console window. The new behaviour is to hide it by default. We'll still see briefly the console at startup and during exit, but that's something that cannot be changed.
If you start blender from a cmd.exe, the console will not be hidden.
Diffstat (limited to 'source/blender/blenlib/intern/winstuff.c')
-rw-r--r-- | source/blender/blenlib/intern/winstuff.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/winstuff.c b/source/blender/blenlib/intern/winstuff.c index 2f750545223..f39cfe14a75 100644 --- a/source/blender/blenlib/intern/winstuff.c +++ b/source/blender/blenlib/intern/winstuff.c @@ -37,6 +37,7 @@ #include <stdlib.h> #include <stdio.h> +#include <conio.h> #include "MEM_guardedalloc.h" #include "BLI_path_util.h" @@ -65,6 +66,14 @@ int BLI_getInstallationDir( char * str ) { return 1; } +int IsConsoleEmpty(void) +{ + CONSOLE_SCREEN_BUFFER_INFO csbi = {0}; + HANDLE hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + + return GetConsoleScreenBufferInfo(hStdOutput, &csbi) && csbi.dwCursorPosition.X == 0 && csbi.dwCursorPosition.Y == 0; +} + void RegisterBlendExtension_Fail(HKEY root) { printf("failed\n"); |