Author: hpoussin
Date: Mon May 18 16:43:12 2009
New Revision: 40965
URL:
http://svn.reactos.org/svn/reactos?rev=40965&view=rev
Log:
Try to load the correct font when booting with /CONSOLE switch
Modified:
trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c
Modified: trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/win…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/win32csr/tuiconsole.c [iso-8859-1] Mon May 18
16:43:12 2009
@@ -32,7 +32,7 @@
}
static BOOL FASTCALL
-TuiInit(VOID)
+TuiInit(DWORD OemCP)
{
CONSOLE_SCREEN_BUFFER_INFO ScrInfo;
DWORD BytesReturned;
@@ -44,6 +44,14 @@
{
DPRINT1("Failed to open BlueScreen.\n");
return FALSE;
+ }
+
+ if (!DeviceIoControl(ConsoleDeviceHandle, IOCTL_CONSOLE_LOADFONT,
+ &OemCP, sizeof(OemCP), NULL, 0,
+ &BytesReturned, NULL))
+ {
+ DPRINT("Failed to load the font for codepage %d\n", OemCP);
+ /* Let's suppose the font is good enough to continue */
}
ActiveConsole = NULL;
@@ -304,7 +312,7 @@
if (! ConsInitialized)
{
ConsInitialized = TRUE;
- if (! TuiInit())
+ if (! TuiInit(Console->CodePage))
{
ConsInitialized = FALSE;
return STATUS_UNSUCCESSFUL;