From 3031cb5f65d664932fa8b2e4388e74fabbe5b62a Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Wed, 1 Jan 2020 11:15:57 +0100 Subject: [PATCH] fix remaining bugs when EXT_ASC is defined --- src/frontend/wdisp/windisp.c | 4 ++-- src/winmain.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/frontend/wdisp/windisp.c b/src/frontend/wdisp/windisp.c index f6b2a4078..dacb22b9c 100644 --- a/src/frontend/wdisp/windisp.c +++ b/src/frontend/wdisp/windisp.c @@ -278,10 +278,10 @@ int WIN_Init(void) lf.lfQuality = 0; lf.lfPitchAndFamily = 0; /* set up fonts */ - if (!cp_getvar("wfont", CP_STRING, lf.lfFaceName)) { + if (!cp_getvar("wfont", CP_STRING, lf.lfFaceName, strlen(lf.lfFaceName))) { (void)lstrcpy(lf.lfFaceName, DEF_FONTW); } - if (!cp_getvar("wfont_size", CP_NUM, &(lf.lfHeight))) { + if (!cp_getvar("wfont_size", CP_NUM, &(lf.lfHeight), 0)) { lf.lfHeight = 18; } PlotFont = CreateFontIndirect(&lf); diff --git a/src/winmain.c b/src/winmain.c index 37b261f87..9e7be66b7 100644 --- a/src/winmain.c +++ b/src/winmain.c @@ -1159,6 +1159,7 @@ wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPWSTR const int iyt = iy / 3; /* height of screen divided by 3 */ #ifdef EXT_ASC hwMain = CreateWindow(hwClassName, hwWindowName, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, + 0, iyt * 2, ix, iyt, NULL, NULL, hInst, NULL); #else hwMain = CreateWindowW(hwClassNameW, hwWindowNameW, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, iyt * 2, ix, iyt, NULL, NULL, hInst, NULL);