grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] do not reset console font when running utils on Windows


From: Vladimir 'φ-coder/phcoder' Serbinenko
Subject: Re: [PATCH] do not reset console font when running utils on Windows
Date: Fri, 27 Dec 2013 19:14:24 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10

On 27.12.2013 18:42, Andrey Borzenkov wrote:
> This is not required as utilities provide just simple text output. This
> avoids surprising unexpected change of window look'n'feel.
> 
Without it windows is unable to output any character outside of default
character set.
> ---
>  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
>  
> 


Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]