Commit 161bc831 authored by Brian Teague's avatar Brian Teague Committed by Alexandre Julliard

Add a stub for the CAPS1 capability in GetDeviceCaps.

Define the CAPS1 bit flags in wingdi.h Make various calls to GetDeviceCaps in DLLS use #defined values.
parent e296bf37
......@@ -1952,7 +1952,7 @@ static int may_use_dibsection(HDC hdc) {
return TRUE;
if (bitspixel<=4)
return FALSE;
return GetDeviceCaps(hdc,94) & 0x10;
return GetDeviceCaps(hdc,CAPS1) & C1_DIBENGINE;
}
#endif
......
......@@ -348,7 +348,7 @@ HIC VFWAPI ICGetDisplayFormat(
HDC hdc;
hdc = GetDC(0);
depth = GetDeviceCaps(hdc,12)*GetDeviceCaps(hdc,14);
depth = GetDeviceCaps(hdc,BITSPIXEL)*GetDeviceCaps(hdc,PLANES);
ReleaseDC(0,hdc);
if (depth==15) depth = 16;
if (depth<8) depth = 8;
......
......@@ -1509,6 +1509,7 @@ typedef struct tagEXTLOGPEN
#define ASPECTXY 44
#define LOGPIXELSX 88
#define LOGPIXELSY 90
#define CAPS1 94
#define SIZEPALETTE 104
#define NUMRESERVED 106
#define COLORRES 108
......@@ -1612,6 +1613,22 @@ typedef struct tagEXTLOGPEN
#define RC_OP_DX_OUTPUT 0x4000
#define RC_DEVBITS 0x8000
/* CAPS1 */
#define C1_TRANSPARENT 0x0001
#define TC_TT_ABLE 0x0002
#define C1_TT_CR_ANY 0x0004
#define C1_EMF_COMPLIANT 0x0008
#define C1_DIBENGINE 0x0010
#define C1_GAMMA_RAMP 0x0040
#define C1_REINIT_ABLE 0x0080
#define C1_GLYPH_INDEX 0x0100
#define C1_BIT_PACKED 0x0200
#define C1_BYTE_PACKED 0x0400
#define C1_COLORCURSOR 0x0800
#define C1_CMYK_ABLE 0x1000
#define C1_SLOW_CARD 0x2000
/* Device-independent bitmaps */
typedef struct {
......
......@@ -820,6 +820,19 @@ INT WINAPI GetDeviceCaps( HDC hdc, INT cap )
case SCALINGFACTORY:
if(Escape(hdc, GETSCALINGFACTOR, 0, NULL, (LPVOID)&pt) > 0) ret = pt.y;
break;
case CAPS1:
FIXME("(%04x,%d): DeviceCaps param CAPS1 is UNIMPLEMENTED, will yield 0!\n",
hdc,cap );
/* please see wingdi.h for the possible bit-flag values that need
to be returned.
also, see
http://msdn.microsoft.com/library/ddkdoc/win95ddk/graphcnt_1m0p.htm
the fall-through to 'default' is on purpose */
default:
if ((cap < 0) || (cap > sizeof(DeviceCaps)-sizeof(WORD))) break;
......
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