fix remaining bugs when EXT_ASC is defined

This commit is contained in:
Holger Vogt 2020-01-01 11:15:57 +01:00
parent 7af5ae0108
commit 3031cb5f65
2 changed files with 3 additions and 2 deletions

View File

@ -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);

View File

@ -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);