From: José Fonseca Date: Mon, 4 May 2009 09:24:12 +0000 (+0100) Subject: MinGW portability fixes. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=2272ecd3e883b21e405040899b03934c27f37634;p=apitrace MinGW portability fixes. --- diff --git a/opengl32.def b/opengl32.def index 9e717a7..a9e174f 100644 --- a/opengl32.def +++ b/opengl32.def @@ -364,7 +364,7 @@ EXPORTS wglShareLists wglSwapBuffers wglSwapLayerBuffers - wglSwapMultipleBuffers +; wglSwapMultipleBuffers wglUseFontBitmapsA wglUseFontBitmapsW wglUseFontOutlinesA diff --git a/opengl32.py b/opengl32.py index 992517a..b8b61e3 100644 --- a/opengl32.py +++ b/opengl32.py @@ -433,7 +433,7 @@ opengl32.functions += [ ] HGLRC = Alias("HGLRC", HANDLE) -PROC = Alias("PROC", LPVOID) +PROC = Intrinsic("PROC", "%p") PFD = Flags(DWORD, [ "PFD_DOUBLEBUFFER", @@ -449,7 +449,7 @@ PFD = Flags(DWORD, [ "PFD_SWAP_COPY", "PFD_SWAP_LAYER_BUFFERS", "PFD_GENERIC_ACCELERATED", - "PFD_SUPPORT_DIRECTDRAW", + #"PFD_SUPPORT_DIRECTDRAW", ]) PIXELFORMATDESCRIPTOR = Struct("PIXELFORMATDESCRIPTOR", [ @@ -526,11 +526,6 @@ LAYERPLANEDESCRIPTOR = Struct("LAYERPLANEDESCRIPTOR", [ ]) LPLAYERPLANEDESCRIPTOR = Pointer(LAYERPLANEDESCRIPTOR) -WGLSWAP = Struct("WGLSWAP", [ - (HDC, "hdc"), - (UINT, "uiFlags"), -]) - opengl32.functions += [ Function(BOOL, "wglCopyContext", [(HGLRC, "hglrcSrc"), (HGLRC, "hglrcDst"), (UINT, "mask")]), Function(HGLRC, "wglCreateContext", [(HDC, "hdc")]), @@ -556,9 +551,18 @@ opengl32.functions += [ Function(Int , "wglGetLayerPaletteEntries", [(HDC, "hdc"), (Int, "iLayerPlane"), (Int, "iStart"), (Int, "cEntries"), (OutPointer(COLORREF), "pcr")]), Function(BOOL , "wglRealizeLayerPalette", [(HDC, "hdc"), (Int, "iLayerPlane"), (BOOL, "bRealize")]), Function(BOOL , "wglSwapLayerBuffers", [(HDC, "hdc"), (UINT, "fuPlanes")]), - Function(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]), ] +if False: + WGLSWAP = Struct("WGLSWAP", [ + (HDC, "hdc"), + (UINT, "uiFlags"), + ]) + + opengl32.functions += [ + Function(DWORD, "wglSwapMultipleBuffers", [(UINT, "n"), (Pointer(Const(WGLSWAP)), "ps")]), + ] + if __name__ == '__main__': print print '#define _GDI32_' @@ -569,4 +573,8 @@ if __name__ == '__main__': print print '#include "log.hpp"' print + print 'extern "C" {' + print wrap() + print + print '}'