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:
authorRay Molenkamp <github@lazydodo.com>2021-05-27 05:02:35 +0300
committerRay Molenkamp <github@lazydodo.com>2021-05-27 05:02:35 +0300
commitf3944cf503966a93a124e389d9232d7f833c0077 (patch)
treedca5e410eedcb5fa947cdbc948d41a7ebd00f060 /source/blender/windowmanager/intern/wm_init_exit.c
parent6fc9ec92574ef55f76eca367565b8b184466b0e8 (diff)
Win: Add launcher to hide the console window flash
This patch fixes a long-standing complaint from users: the console window shortly flashing when they start blender. This is done by adding a new executable called blender-launcher.exe which starts blender.exe while hiding the console. Any command line parameters given to blender-launcher will be passed on to blender.exe so it'll be a drop in replacement. Starting blender.exe on its own will still function as a proper console app so no changes required here for users that use blender for batch processing. Notable changes: Registering blender (-R switch) will now register blender-launcher as the preferred executable. This patch updates the installer and updates the shortcuts to start blender-launcher.exe rather than blender.exe Differential Revision: https://developer.blender.org/D11094 Reviewed by: brecht, harley
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r--source/blender/windowmanager/intern/wm_init_exit.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c
index 56fd51ac6fd..0dcb817ad15 100644
--- a/source/blender/windowmanager/intern/wm_init_exit.c
+++ b/source/blender/windowmanager/intern/wm_init_exit.c
@@ -343,8 +343,13 @@ void WM_init(bContext *C, int argc, const char **argv)
(void)argv; /* unused */
#endif
- if (!G.background && !wm_start_with_console) {
- GHOST_toggleConsole(3);
+ if (!G.background) {
+ if (wm_start_with_console) {
+ GHOST_toggleConsole(1);
+ }
+ else {
+ GHOST_toggleConsole(3);
+ }
}
BKE_material_copybuf_clear();