ddraw - Implement correct behavior for the DDEDM_REFRESHRATES flag in EnumDisplayModes() - REJECTED.

Stefan Dösinger stefan at codeweavers.com
Tue Feb 12 17:50:20 CST 2008

Am Mittwoch, 13. Februar 2008 00:39:52 schrieb Peter Dons Tychsen:
> Hi Devs.
> I had this patch silently rejected.
> Can anybody spot what is wrong with this patch?
My first thought was that filtering the modes like this is kinda ugly, but 
given that ddraw uses wined3d and wined3d uses the d3d9 interface this is the 
only way. (I don't think adding an extra flag to wined3d is cleaner, 
considering that ddraw can sort this out on its own).

However, I think you shouldn't clone the application's bug you're trying to 
work around and deal with the "out of mode buffer" case. you can e.g. use 
HeapReAlloc to increase the buffer without loosing the content.

Another minor thing is the if(buffer) HeapFree(buffer) code. HeapFree checks 
against NULL, so the extra check isn't needed, and it is sorta a policy not 
to have redundant checks before HeapFree

More information about the wine-devel mailing list