Indeed 😀
(see link to the patch on my page)
Here's an update to the patch. I've spent some time making it more compile friendly. It now modifies configure.in so you have to run autogen.sh before configure. It will add a few options to configure script:
--disable-shaders, will disable linking with d3dx9.lib even if it exists
--with-dx-headers=DIR, incase directx headers are not in mingw include directories
--with-dx-libs=DIR, incase directx libs are not in mingw lib directory
The configure script will now also properly check for d3d headers and libs. D3D can be compiled either with or without d3dx9. The good news is that mingw distribution already has all the files necessary to compile without shader support - compilation should be as easy as typing ./configure 😀
If you want shader scaling though, directx sdk is needed. The code has been modified to compile with all dx9 versions (9.0, a, b & c - ok, I won't bet my money on it, but I'm reasonably sure it should work 😀). The headers from the sdk can be just copied to some mingw reachable directory (specify with --with-dx-headers). For linking d3dx9 is needed. The d3dx9.lib library from official sdk has to be converted for mingw use with reimp utility. Just type 'reimp d3dx9.lib' and libd3dx9.a should be created (if it has a different name like libd3dx9_26.a, rename it - the configure script will only look for libd3dx9.a)...copy it to mingw lib dir (or specify a different directory --with-dx-libs=DIR). You will then probably also need to find a suitable runtime d3dx9.dll.
With these changes basic D3D support should be easy to compile and does not need any additional sdks or runtime dlls (other than what should already be installed on a xp machine). Shader support is somewhat more tricky, devpack9b is probably still the best bet if you have it. Otherwise you'll have to go with M$ official sdk...This changes should now also theoretically allow D3D to be compiled for x64 (since dx9b did not have x64 dx libs) but we might not be there yet 😀. I haven't posted this to my page yet since it's now harder to test all compilation cases, what is and what isn't available on some particular machine plus this is my first tinkering with configure.in script. It's quite possible I messed up something or that something could be made better...