[CONSRV] Trivially implement TuiSetCodePage(). CORE-17601

This commit is contained in:
Hermès Bélusca-Maïto 2021-07-04 00:51:49 +02:00
parent 9f201d462d
commit 1ffe431827
No known key found for this signature in database
GPG key ID: 3B2539C65E7B93D0

View file

@ -1131,9 +1131,17 @@ static BOOL NTAPI
TuiSetCodePage(IN OUT PFRONTEND This,
UINT CodePage)
{
// TODO: Find a suitable console font for the given code page,
// and set it if found; otherwise fail the call, or fall back
// to some default font...
// PTUI_CONSOLE_DATA TuiData = This->Context;
// TODO: Verify that the console is the visible one.
// Only then can we change the output code page font.
if (!TuiSetConsoleOutputCP(ConsoleDeviceHandle, CodePage))
{
DPRINT1("Failed to load the font for codepage %d\n", CodePage);
/* Let's suppose the font is good enough to continue */
return FALSE;
}
return TRUE;
}