From 5628a5c3a4d6c16c5dae536be631c9eff02d53a5 Mon Sep 17 00:00:00 2001 From: "Kirill Lipatov (Leency)" Date: Sat, 6 Feb 2021 17:17:23 +0000 Subject: [PATCH] Backy: no console window when it is not necessary git-svn-id: svn://kolibrios.org@8583 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/backy/Backy.c | 10 ++++++---- programs/develop/backy/gcc_version/Backy.c | 8 +++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/programs/develop/backy/Backy.c b/programs/develop/backy/Backy.c index a1b2f6a92b..79d7de8545 100644 --- a/programs/develop/backy/Backy.c +++ b/programs/develop/backy/Backy.c @@ -47,9 +47,6 @@ char state; int main(int argc, char** argv) { - if (con_init_console_dll()) return 1; // init fail. - - con_set_title("Backy"); // ============================================================ // // preprocessing arguments from the command line. ============= // @@ -151,13 +148,15 @@ int main(int argc, char** argv) } else { + if (con_init_console_dll()) return 1; // init fail. + con_set_title("Useful info!"); #if defined (lang_en) con_printf("\n Name: Backy"); con_printf("\n Date: %s", CREATION_DATE); - con_printf("\n Description: The programme for backing up a file.\n"); + con_printf("\n Description: The programm for backing up a file.\n"); con_printf("\n Author: JohnXenox\n"); @@ -375,6 +374,9 @@ int main(int argc, char** argv) if(data == 0) { + if (con_init_console_dll()) return 1; // init fail. + con_set_title("Backy"); + #if defined (lang_en) con_printf("\nThe file isn't found!\n"); diff --git a/programs/develop/backy/gcc_version/Backy.c b/programs/develop/backy/gcc_version/Backy.c index 91f304dbfa..2c0d027c04 100755 --- a/programs/develop/backy/gcc_version/Backy.c +++ b/programs/develop/backy/gcc_version/Backy.c @@ -47,9 +47,6 @@ char state; int main(int argc, char** argv) { - load_console(); - - con_set_title("Backy"); // ============================================================ // // preprocessing arguments from the command line. ============= // @@ -151,6 +148,8 @@ int main(int argc, char** argv) } else { + load_console(); + con_set_title("Useful info!"); #if defined (lang_en) @@ -375,6 +374,9 @@ int main(int argc, char** argv) if(data == 0) { + load_console(); + con_set_title("Backy"); + #if defined (lang_en) con_printf("\nThe file isn't found!\n");