grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Borzenkov <arvidjaar@gmail.com>
To: grub-devel@gnu.org
Subject: [PATCH] do not reset console font when running utils on Windows
Date: Fri, 27 Dec 2013 21:42:12 +0400	[thread overview]
Message-ID: <1388166132-10890-1-git-send-email-arvidjaar@gmail.com> (raw)

This is not required as utilities provide just simple text output. This
avoids surprising unexpected change of window look'n'feel.

---
 grub-core/osdep/windows/init.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/grub-core/osdep/windows/init.c b/grub-core/osdep/windows/init.c
index 98c325c..629d785 100644
--- a/grub-core/osdep/windows/init.c
+++ b/grub-core/osdep/windows/init.c
@@ -30,6 +30,7 @@
 
 #include "progname.h"
 
+#ifndef GRUB_UTIL
 struct grub_windows_console_font_infoex {
   ULONG cbSize;
   DWORD nFont;
@@ -111,6 +112,7 @@ set_console_unicode_font (void)
 	func_SetConsoleFont (err_handle, 12);
     }
 }
+#endif
 
 static char *grub_util_base_directory;
 static char *locale_dir;
@@ -148,10 +150,12 @@ grub_util_host_init (int *argc __attribute__ ((unused)),
 {
   char *ptr;
 
+#infdef GRUB_UTIL
   SetConsoleOutputCP (CP_UTF8);
   SetConsoleCP (CP_UTF8);
 
   set_console_unicode_font ();
+#endif
 
 #if SIZEOF_TCHAR == 1
 
-- 
tg: (645ff63..) u/mingw/console-font (depends on: master)


             reply	other threads:[~2013-12-27 17:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-27 17:42 Andrey Borzenkov [this message]
2013-12-27 18:14 ` [PATCH] do not reset console font when running utils on Windows Vladimir 'φ-coder/phcoder' Serbinenko
2013-12-27 18:27   ` Andrey Borzenkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1388166132-10890-1-git-send-email-arvidjaar@gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).