Author: hbelusca
Date: Sun Jun 16 21:35:18 2013
New Revision: 59240
URL: http://svn.reactos.org/svn/reactos?rev=59240&view=rev
Log:
[KERNEL32]
- Change the argument types of both GetConsoleFontInfo() and SetConsoleFont() to be more complete. This research is based off of the examining of source code from the jockx-the-game project (licensed under a BSD license). Specifically, the files containing the functions are in both ConsoleFont.cpp and ConsoleFont.h:
* http://code.google.com/p/jockx-the-game/source/browse/DamageCalc/ConsoleFon…
* http://code.google.com/p/jockx-the-game/source/browse/DamageCalc/ConsoleFon…
- Since the code for jockx-the-game used a 0 for the boolean argument for GetConsoleFontInfo() in ConsoleFont.cpp, the patch creator currently doesn't know what the argument does exactly.
**NOTE**: Using http://pages.videotron.com/lyra/PowerBASIC/ConsoleFont.html too, the patch committer (hbelusca) was able to deduce that the boolean has the same meaning as the bMaximumWindow parameter of the GetCurrentConsoleFont function (http://msdn.microsoft.com/en-us/library/windows/desktop/ms683176(v=vs.85).a…).
Patch by Lee Schroeder, modified by me as explained above.
CORE-7015 #resolve #comment Committed in revision r, thanks :)
Extras:
- Fix the return type of GetCurrentConsoleFont
- Add both GetConsoleFontSize and GetCurrentConsoleFont prototypes (documented) to wincon.h
Modified:
trunk/reactos/dll/win32/kernel32/client/console/console.c
trunk/reactos/include/psdk/wincon.h
Modified: trunk/reactos/dll/win32/kernel32/client/console/console.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/console/console.c [iso-8859-1] Sun Jun 16 21:35:18 2013
@@ -346,12 +346,12 @@
*/
DWORD
WINAPI
-GetConsoleFontInfo(DWORD Unknown0,
- DWORD Unknown1,
- DWORD Unknown2,
- DWORD Unknown3)
-{
- DPRINT1("GetConsoleFontInfo(0x%x, 0x%x, 0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1, Unknown2, Unknown3);
+GetConsoleFontInfo(HANDLE hConsoleOutput,
+ BOOL bMaximumWindow,
+ DWORD nFontCount,
+ PCONSOLE_FONT_INFO lpConsoleFontInfo)
+{
+ DPRINT1("GetConsoleFontInfo(0x%x, %d, %d, 0x%x) UNIMPLEMENTED!\n", hConsoleOutput, bMaximumWindow, nFontCount, lpConsoleFontInfo);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
@@ -424,7 +424,7 @@
/*
* @unimplemented
*/
-INT
+BOOL
WINAPI
GetCurrentConsoleFont(HANDLE hConsoleOutput,
BOOL bMaximumWindow,
@@ -610,10 +610,10 @@
*/
BOOL
WINAPI
-SetConsoleFont(DWORD Unknown0,
- DWORD Unknown1)
-{
- DPRINT1("SetConsoleFont(0x%x, 0x%x) UNIMPLEMENTED!\n", Unknown0, Unknown1);
+SetConsoleFont(HANDLE hConsoleOutput,
+ DWORD nFont)
+{
+ DPRINT1("SetConsoleFont(0x%x, %d) UNIMPLEMENTED!\n", hConsoleOutput, nFont);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
Modified: trunk/reactos/include/psdk/wincon.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/wincon.h?rev=…
==============================================================================
--- trunk/reactos/include/psdk/wincon.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/wincon.h [iso-8859-1] Sun Jun 16 21:35:18 2013
@@ -367,6 +367,19 @@
GetConsoleTitleW(
_Out_writes_(nSize) LPWSTR lpConsoleTitle,
_In_ DWORD nSize);
+
+COORD
+WINAPI
+GetConsoleFontSize(
+ _In_ HANDLE hConsoleOutput,
+ _In_ DWORD nFont);
+
+BOOL
+WINAPI
+GetCurrentConsoleFont(
+ _In_ HANDLE hConsoleOutput,
+ _In_ BOOL bMaximumWindow,
+ _Out_ PCONSOLE_FONT_INFO lpConsoleCurrentFont);
#if (_WIN32_WINNT >= 0x0500)
HWND WINAPI GetConsoleWindow(VOID);