Detect DCs without fonts and return an error in wglUseBitmapFonts.

This commit is contained in:
Lionel Ulmer 2002-07-03 01:16:45 +00:00 committed by Alexandre Julliard
parent 62a329a528
commit a3f4e7ff3f
2 changed files with 5 additions and 2 deletions

View File

@ -445,7 +445,7 @@ BOOL WINAPI wglSwapLayerBuffers(HDC hdc,
if (fuPlanes) {
WARN("Following layers unhandled : %08x\n", fuPlanes);
}
return TRUE;
}
@ -459,7 +459,9 @@ BOOL WINAPI wglUseFontBitmapsA(HDC hdc,
{
Font fid = get_font( hdc );
TRACE("(%08x, %ld, %ld, %ld)\n", hdc, first, count, listBase);
TRACE("(%08x, %ld, %ld, %ld) using font %ld\n", hdc, first, count, listBase, fid);
if (fid == 0) return FALSE;
ENTER_GL();
/* I assume that the glyphs are at the same position for X and for Windows */

View File

@ -290,6 +290,7 @@ INT X11DRV_ExtEscape( X11DRV_PDEVICE *physDev, INT escape, INT in_count, LPCVOID
if (out_count >= sizeof(Font))
{
fontObject* pfo = XFONT_GetFontObject( physDev->font );
if (pfo == NULL) return FALSE;
*(Font *)out_data = pfo->fs->fid;
return TRUE;
}