[6/8] WineD3D: Return a different success value if D3D is not available
stefan at codeweavers.com
Thu Aug 6 04:21:36 CDT 2009
Am Thursday 06 August 2009 09:35:12 schrieb Henri Verbeet:
> Aside from the fact that you can't know WineDirect3DCreate() failed
> because of a lack of OpenGL without looking at its implementation, I
> liked the create flags approach better.
Well, the WINED3DOK_NO3D is intended to say "you got your d3d object, but it
will only do 2D drawing for you", and then its up to the client to accept
this or not(Although I just see I forgot to release the returned object in
this case). I don't see the problem.
I dislike create flags as much as dxVersion checks, and we should handle as
much as possible without them. I feel strongly against using a create flag in
patch 4. I just think passing in a flag to call X and call Y's behavior will
miraculously change is ugly, although sometimes we can't avoid it.
The only places where I think we really need a create flag:
* Fixed buffer declarations
* D3D7 VB conversion / no conversion
* device vs surface palette
* and the COM priv data addref or no addref, although maybe there's a way to
add a release() in ddraw
* the surface pitch alignment
That's quite a lot of them already
More information about the wine-devel