open-watcom / open-watcom-v2

Open Watcom V2.0 - Source code repository, Wiki, Latest Binary build, Archived builds including all installers for download.
Other
956 stars 157 forks source link

ddraw.h unusable #368

Open sezero opened 7 years ago

sezero commented 7 years ago

nt/directx/ddraw.h is unusable as it is: one can't compile SDL against it because of lots of erroneously defined interfaces and typos.

I made a very minimal patch to make SDL at least compile against it (attached here), but as I said the patch is minimal and not thoroughly tested and possibly misses many other mistakes.

ddraw.h from DX7 should be enough for comparing and fixing the OW version, it can be found at these ftps: ftp://malibu.tuxfamily.net/allegro/files/ ftp://absinthe.tuxfamily.net/allegro/files/

ddraw_patch.txt

jmalak commented 7 years ago

Many thanks for your contribution, Applied by 3a6a52c037b0db5e71fd9e1e367ea697bb764605 commit.

jmalak commented 7 years ago

I review ddraw header file and fix other errors by cd9692d3911342bbdde47c243a8504f042851b13 commit. Please, could you check it.

sezero commented 7 years ago

By a brief look, it seems OK, thanks.

One problem, and this one is not limited to ddraw.h but to all others as well: The GUID declarations doesn't respect the INITGUID user macro. The DEFINE_GUID macro should be used for them, which does respect the INITGUID macro.

jmalak commented 7 years ago

Thanks for your comment. I will leave this issue open for future fixing, because it will require overall review of WIN32 header files and priority is not high

revelator commented 6 years ago

ms dx9sdk works like a charm with OW, but need to make sure headers / libraries come before the OW ones. A built in minimal sdk without bugs is a worthy goal though.

jmalak commented 6 years ago

It is possible that it is working due to OW compatibility with MS compilers. But thare can be a problem with some MS features which are not implemented in OW and are used in MS headers. You are OK until you don't use similar feature.

sskras commented 2 years ago

@jmalak commented on Aug 12, 2017:

Thanks for your comment. I will leave this issue open for future fixing, because it will require overall review of WIN32 header files and priority is not high

Do you mean all files in bld/w32api/include (recursively)?

jmalak commented 2 years ago

Not all only DirectX related, but can be other referenced if something specific.

sezero commented 2 years ago

Changes are necessary in all w32 headers where GUIDs are defined, using DEFINE_GUID obviously, and they all should be made to respect INITGUID

jmalak commented 2 years ago

@sezero thanks for your specification