Commit 4e351b47 authored by Hugh McMaster's avatar Hugh McMaster Committed by Alexandre Julliard

kernel32: Return font size, not screen buffer size, from GetCurrentConsoleFontEx.

GetCurrentConsoleFontEx currently returns the screen buffer size when maxwindow is FALSE. It should return the current console font size. Signed-off-by: 's avatarHugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent e4f3d787
...@@ -407,8 +407,8 @@ BOOL WINAPI GetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FON ...@@ -407,8 +407,8 @@ BOOL WINAPI GetCurrentConsoleFontEx(HANDLE hConsole, BOOL maxwindow, CONSOLE_FON
} }
else else
{ {
fontinfo->dwFontSize.X = data.info.win_right - data.info.win_left + 1; fontinfo->dwFontSize.X = data.info.font_width;
fontinfo->dwFontSize.Y = data.info.win_bottom - data.info.win_top + 1; fontinfo->dwFontSize.Y = data.info.font_height;
} }
size -= sizeof(data.info); size -= sizeof(data.info);
if (size) memcpy( fontinfo->FaceName, data.face_name, size ); if (size) memcpy( fontinfo->FaceName, data.face_name, size );
......
...@@ -3527,14 +3527,14 @@ static void test_GetCurrentConsoleFontEx(HANDLE std_output) ...@@ -3527,14 +3527,14 @@ static void test_GetCurrentConsoleFontEx(HANDLE std_output)
ok(c.X && c.Y, "GetConsoleFontSize failed; err = %u\n", GetLastError()); ok(c.X && c.Y, "GetConsoleFontSize failed; err = %u\n", GetLastError());
ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError()); ok(GetLastError() == 0xdeadbeef, "got %u, expected 0xdeadbeef\n", GetLastError());
todo_wine ok(cfix.dwFontSize.X == c.X, "Font width doesn't match; got %u, expected %u\n", ok(cfix.dwFontSize.X == c.X, "Font width doesn't match; got %u, expected %u\n",
cfix.dwFontSize.X, c.X); cfix.dwFontSize.X, c.X);
todo_wine ok(cfix.dwFontSize.Y == c.Y, "Font height doesn't match; got %u, expected %u\n", ok(cfix.dwFontSize.Y == c.Y, "Font height doesn't match; got %u, expected %u\n",
cfix.dwFontSize.Y, c.Y); cfix.dwFontSize.Y, c.Y);
todo_wine ok(cfi.dwFontSize.X == c.X, "Font width doesn't match; got %u, expected %u\n", ok(cfi.dwFontSize.X == c.X, "Font width doesn't match; got %u, expected %u\n",
cfi.dwFontSize.X, c.X); cfi.dwFontSize.X, c.X);
todo_wine ok(cfi.dwFontSize.Y == c.Y, "Font height doesn't match; got %u, expected %u\n", ok(cfi.dwFontSize.Y == c.Y, "Font height doesn't match; got %u, expected %u\n",
cfi.dwFontSize.Y, c.Y); cfi.dwFontSize.Y, c.Y);
SetLastError(0xdeadbeef); SetLastError(0xdeadbeef);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment