Commit 6ac67518 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Record escapes in metafiles.

parent 783b3236
...@@ -536,22 +536,21 @@ INT MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data, ...@@ -536,22 +536,21 @@ INT MFDRV_ExtEscape( PHYSDEV dev, INT nEscape, INT cbInput, LPCVOID in_data,
{ {
METARECORD *mr; METARECORD *mr;
DWORD len; DWORD len;
INT ret;
if(nEscape == MFCOMMENT) {
len = sizeof(*mr) + sizeof(WORD) + ((cbInput + 1) & ~1); len = sizeof(*mr) + sizeof(WORD) + ((cbInput + 1) & ~1);
mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len); mr = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, len);
mr->rdSize = len / 2; mr->rdSize = len / 2;
mr->rdFunction = META_ESCAPE; mr->rdFunction = META_ESCAPE;
mr->rdParm[0] = nEscape; mr->rdParm[0] = nEscape;
mr->rdParm[1] = cbInput; mr->rdParm[1] = cbInput;
memcpy(&(mr->rdParm[2]), in_data, cbInput); memcpy(&(mr->rdParm[2]), in_data, cbInput);
MFDRV_WriteRecord( dev, mr, len); ret = MFDRV_WriteRecord( dev, mr, len);
HeapFree(GetProcessHeap(), 0, mr); HeapFree(GetProcessHeap(), 0, mr);
return 1; return ret;
}
return 0;
} }
/****************************************************************** /******************************************************************
* MFDRV_GetDeviceCaps * MFDRV_GetDeviceCaps
* *
...@@ -562,9 +561,11 @@ INT MFDRV_GetDeviceCaps(PHYSDEV dev, INT cap) ...@@ -562,9 +561,11 @@ INT MFDRV_GetDeviceCaps(PHYSDEV dev, INT cap)
switch(cap) switch(cap)
{ {
case TECHNOLOGY: case TECHNOLOGY:
return DT_METAFILE; return DT_METAFILE;
case TEXTCAPS:
return 0;
default: default:
TRACE(" unsupported capability %d, will return 0\n", cap ); TRACE(" unsupported capability %d, will return 0\n", cap );
return 0;
} }
return 0;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment