HANDLE filemap;
void *cp;
unsigned cpsize;
- if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 1 &&
+ if (sscanf(p + 1, "%p:%u", &filemap, &cpsize) == 2 &&
(cp = MapViewOfFile(filemap, FILE_MAP_READ,
0, 0, cpsize)) != NULL) {
conf_deserialise(conf, cp, cpsize);
#define f(i,c,w,u) \
fonts[i] = CreateFont (font_height, font_width, 0, 0, w, FALSE, u, FALSE, \
c, OUT_DEFAULT_PRECIS, \
- CLIP_DEFAULT_PRECIS, quality, \
+ CLIP_DEFAULT_PRECIS, FONT_QUALITY(quality), \
FIXED_PITCH | FF_DONTCARE, font->name)
f(FONT_NORMAL, font->charset, fw_dontcare, FALSE);
*/
need_backend_resize = TRUE;
conf_set_int(conf, CONF_height, h);
- conf_set_int(conf, CONF_height, w);
+ conf_set_int(conf, CONF_width, w);
} else {
term_size(term, h, w, conf_get_int(conf, CONF_savelines));
}
dec = dec * 2 - font_height;
oldpen = SelectObject(hdc, CreatePen(PS_SOLID, 0, fg));
- MoveToEx(hdc, x, y + dec, NULL);
- LineTo(hdc, x + len * char_width, y + dec);
+ MoveToEx(hdc, line_box.left, line_box.top + dec, NULL);
+ LineTo(hdc, line_box.right, line_box.top + dec);
oldpen = SelectObject(hdc, oldpen);
DeleteObject(oldpen);
}