Hugh McMaster : kernel32: Implement the TRUE pathway of GetCurrentConsoleFont.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Jan 27 11:27:21 CST 2016


Module: wine
Branch: master
Commit: 2c5756347bc4e9abcb656a7d1e001f60415b78b2
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=2c5756347bc4e9abcb656a7d1e001f60415b78b2

Author: Hugh McMaster <hugh.mcmaster at outlook.com>
Date:   Wed Jan 27 14:55:16 2016 +1100

kernel32: Implement the TRUE pathway of GetCurrentConsoleFont.

Signed-off-by: Hugh McMaster <hugh.mcmaster at outlook.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/kernel32/console.c | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/dlls/kernel32/console.c b/dlls/kernel32/console.c
index 4767fb2..b86cd8e 100644
--- a/dlls/kernel32/console.c
+++ b/dlls/kernel32/console.c
@@ -3267,20 +3267,21 @@ BOOL WINAPI GetCurrentConsoleFont(HANDLE hConsole, BOOL maxwindow, LPCONSOLE_FON
 
     memset(fontinfo, 0, sizeof(CONSOLE_FONT_INFO));
 
-    if (maxwindow)
-    {
-        FIXME(": (%p, %d, %p) stub!\n", hConsole, maxwindow, fontinfo);
-        SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
-        return FALSE;
-    }
-
     SERVER_START_REQ(get_console_output_info)
     {
         req->handle = console_handle_unmap(hConsole);
         if ((ret = !wine_server_call_err(req)))
         {
-            fontinfo->dwFontSize.X = reply->win_right - reply->win_left + 1;
-            fontinfo->dwFontSize.Y = reply->win_bottom - reply->win_top + 1;
+            if (maxwindow)
+            {
+                fontinfo->dwFontSize.X = min(reply->width, reply->max_width);
+                fontinfo->dwFontSize.Y = min(reply->height, reply->max_height);
+            }
+            else
+            {
+                fontinfo->dwFontSize.X = reply->win_right - reply->win_left + 1;
+                fontinfo->dwFontSize.Y = reply->win_bottom - reply->win_top + 1;
+            }
         }
     }
     SERVER_END_REQ;




More information about the wine-cvs mailing list