-/* $Id: stubs.c,v 1.33 2003/09/06 16:50:11 jimtabor Exp $
+/* $Id: stubs.c,v 1.34 2003/09/06 19:44:00 jimtabor Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
}
-/*
- * @unimplemented
- */
-UINT
-STDCALL
-GetEnhMetaFilePixelFormat(
- HENHMETAFILE a0,
- DWORD a1,
- CONST PIXELFORMATDESCRIPTOR *a2
- )
-{
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
-
-
/*
* @unimplemented
*/
#undef WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <ddk/ntddk.h>
-
+#include <string.h>
#define NDEBUG
#include <win32k/debug1.h>
static SWAPBUFFERS glSwapBuffers = NULL;
static DESCRIBEPIXELFMT glDescribePixelFormat = NULL;
static GETPIXELFMT glGetPixelFormat = NULL;
-static HINSTANCE hOpenGL = NULL;
+
+/*
+ OpenGL Handle.
+*/
+HINSTANCE hOpenGL = NULL;
static BOOL OpenGLEnable(void)
{
return(glSwapBuffers(hDC));
}
+
+/*
+ Do this here for now.
+*/
+
+/*
+ * @implemented
+ */
+UINT
+STDCALL
+GetEnhMetaFilePixelFormat(
+ HENHMETAFILE hEmh,
+ DWORD cbBufz,
+ CONST PIXELFORMATDESCRIPTOR *ppfd
+ )
+{
+ENHMETAHEADER pemh;
+
+ if(GetEnhMetaFileHeader(hEmh, sizeof(ENHMETAHEADER), &pemh))
+ {
+ if(pemh.bOpenGL)
+ {
+ if(pemh.cbPixelFormat)
+ {
+ memcpy((void*)ppfd, (const void *)pemh.offPixelFormat, cbBufz );
+ return(pemh.cbPixelFormat);
+ }
+ }
+ }
+ return(0);
+}
+
/* EOF */