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/creator | |
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/creator')
-rw-r--r-- | source/creator/creator.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/creator/creator.c b/source/creator/creator.c index 1db143cdd20..df8ba38701d 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -247,6 +247,7 @@ static int print_help(int UNUSED(argc), const char **UNUSED(argv), void *data) BLI_argsPrintArgDoc(ba, "--window-border"); BLI_argsPrintArgDoc(ba, "--window-borderless"); BLI_argsPrintArgDoc(ba, "--window-geometry"); + BLI_argsPrintArgDoc(ba, "--start-console"); printf("\n"); printf ("Game Engine Specific Options:\n"); @@ -484,6 +485,13 @@ static int without_borders(int UNUSED(argc), const char **UNUSED(argv), void *UN return 0; } +extern int wm_start_with_console; // blender/windowmanager/intern/wm_init_exit.c +static int start_with_console(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data)) +{ + wm_start_with_console = 1; + return 0; +} + static int register_extension(int UNUSED(argc), const char **UNUSED(argv), void *data) { #ifdef WIN32 @@ -1095,6 +1103,7 @@ static void setupArguments(bContext *C, bArgs *ba, SYS_SystemHandle *syshandle) BLI_argsAdd(ba, 2, "-p", "--window-geometry", "<sx> <sy> <w> <h>\n\tOpen with lower left corner at <sx>, <sy> and width and height as <w>, <h>", prefsize, NULL); BLI_argsAdd(ba, 2, "-w", "--window-border", "\n\tForce opening with borders (default)", with_borders, NULL); BLI_argsAdd(ba, 2, "-W", "--window-borderless", "\n\tForce opening without borders", without_borders, NULL); + BLI_argsAdd(ba, 2, "-con", "--start-console", "\n\tStart with the console window open (ignored if -b is set)", start_with_console, NULL); BLI_argsAdd(ba, 2, "-R", NULL, "\n\tRegister .blend extension, then exit (Windows only)", register_extension, NULL); BLI_argsAdd(ba, 2, "-r", NULL, "\n\tSilently register .blend extension, then exit (Windows only)", register_extension, ba); |