* fhandler_console.cc (set_console_title): Convert title string to
wchar_t and call SetConsoleTitleW.
This commit is contained in:
parent
f17f20c139
commit
7774a4b029
|
@ -1,3 +1,8 @@
|
||||||
|
2009-06-04 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* fhandler_console.cc (set_console_title): Convert title string to
|
||||||
|
wchar_t and call SetConsoleTitleW.
|
||||||
|
|
||||||
2009-06-04 Corinna Vinschen <corinna@vinschen.de>
|
2009-06-04 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
* fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
|
* fhandler_console.cc (fhandler_console::read): Allow Ctrl-Space to
|
||||||
|
|
|
@ -1892,12 +1892,11 @@ fhandler_console::set_close_on_exec (bool val)
|
||||||
void __stdcall
|
void __stdcall
|
||||||
set_console_title (char *title)
|
set_console_title (char *title)
|
||||||
{
|
{
|
||||||
char buf[257];
|
wchar_t buf[257];
|
||||||
strncpy (buf, title, sizeof (buf) - 1);
|
sys_mbstowcs (buf, sizeof buf, title);
|
||||||
buf[sizeof (buf) - 1] = '\0';
|
|
||||||
lock_ttys here (15000);
|
lock_ttys here (15000);
|
||||||
SetConsoleTitle (buf);
|
SetConsoleTitleW (buf);
|
||||||
debug_printf ("title '%s'", buf);
|
debug_printf ("title '%W'", buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue