diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-10-30 23:06:57 +0000 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-10-30 23:06:57 +0000 |
commit | 68d0503f48dfaeb07d9451388a0a83897530433b (patch) | |
tree | 01125b7ba70b9cbe9010b6f40aa5a9e3d13d6295 /specs | |
parent | 7418bc861f6a73faaeb0ca0e78638e633aee607f (diff) |
ddrawtrace: Fix tracing of DDCREATE_* flags.
Diffstat (limited to 'specs')
-rw-r--r-- | specs/ddraw.py | 25 |
1 files changed, 10 insertions, 15 deletions
diff --git a/specs/ddraw.py b/specs/ddraw.py index 2a63269d..99f542fe 100644 --- a/specs/ddraw.py +++ b/specs/ddraw.py @@ -747,17 +747,23 @@ DDCOLORCONTROL = Struct("DDCOLORCONTROL", [ ]) LPDDCOLORCONTROL = Pointer(DDCOLORCONTROL) -DirectDrawEnumerateExFlags = Flags(DWORD, [ +DDENUM = Flags(DWORD, [ "DDENUM_ATTACHEDSECONDARYDEVICES", "DDENUM_DETACHEDSECONDARYDEVICES", "DDENUM_NONDISPLAYDEVICES", ]) -DirectDrawCreateFlags = FakeEnum(DWORD, [ +DDCREATE = FakeEnum(DWORD, [ "DDCREATE_HARDWAREONLY", "DDCREATE_EMULATIONONLY", ]) +DDCREATE_LPGUID = Polymorphic("reinterpret_cast<uintptr_t>(lpGUID)", [ + ("DDCREATE_HARDWAREONLY", IntPointer("LPGUID")), + ("DDCREATE_EMULATIONONLY", IntPointer("LPGUID")), +], LPGUID) + + DirectDrawColorControlFlags = Flags(DWORD, [ "DDCOLOR_BRIGHTNESS", "DDCOLOR_CONTRAST", @@ -1621,25 +1627,14 @@ LPDDENUMCALLBACKW = FunctionPointer(BOOL, "LPDDENUMCALLBACKW", [Pointer(GUID), LPDDENUMCALLBACKEXA = FunctionPointer(BOOL, "LPDDENUMCALLBACKEXA", [Pointer(GUID), LPSTR, LPSTR, LPVOID, HMONITOR]) LPDDENUMCALLBACKEXW = FunctionPointer(BOOL, "LPDDENUMCALLBACKEXW", [Pointer(GUID), LPWSTR, LPWSTR, LPVOID, HMONITOR]) -DDENUM = Flags(DWORD, [ - "DDENUM_ATTACHEDSECONDARYDEVICES", - "DDENUM_DETACHEDSECONDARYDEVICES", - "DDENUM_NONDISPLAYDEVICES", -]) - -DDCREATE = Flags(DWORD, [ - "DDCREATE_HARDWAREONLY", - "DDCREATE_EMULATIONONLY", -]) - ddraw = Module("ddraw") ddraw.addFunctions([ StdFunction(HRESULT, "DirectDrawEnumerateW", [(LPDDENUMCALLBACKW, "lpCallback"), (LPVOID, "lpContext")], sideeffects=False), StdFunction(HRESULT, "DirectDrawEnumerateA", [(LPDDENUMCALLBACKA, "lpCallback"), (LPVOID, "lpContext")], sideeffects=False), StdFunction(HRESULT, "DirectDrawEnumerateExW", [(LPDDENUMCALLBACKEXW, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")], sideeffects=False), StdFunction(HRESULT, "DirectDrawEnumerateExA", [(LPDDENUMCALLBACKEXA, "lpCallback"), (LPVOID, "lpContext"), (DDENUM, "dwFlags")], sideeffects=False), - StdFunction(HRESULT, "DirectDrawCreate", [(Pointer(GUID), "lpGUID"), Out(Pointer(LPDIRECTDRAW), "lplpDD"), (LPUNKNOWN, "pUnkOuter")]), - StdFunction(HRESULT, "DirectDrawCreateEx", [(Pointer(GUID), "lpGuid"), Out(Pointer(ObjPointer(Void)), "lplpDD"), (REFIID, "iid"), (LPUNKNOWN, "pUnkOuter")]), + StdFunction(HRESULT, "DirectDrawCreate", [(DDCREATE_LPGUID, "lpGUID"), Out(Pointer(LPDIRECTDRAW), "lplpDD"), (LPUNKNOWN, "pUnkOuter")]), + StdFunction(HRESULT, "DirectDrawCreateEx", [(DDCREATE_LPGUID, "lpGUID"), Out(Pointer(ObjPointer(Void)), "lplpDD"), (REFIID, "iid"), (LPUNKNOWN, "pUnkOuter")]), StdFunction(HRESULT, "DirectDrawCreateClipper", [(DWORD, "dwFlags"), Out(Pointer(LPDIRECTDRAWCLIPPER), "lplpDDClipper"), (LPUNKNOWN, "pUnkOuter")]), StdFunction(Void, "AcquireDDThreadLock", [], internal=True), StdFunction(Void, "ReleaseDDThreadLock", [], internal=True), |