<font face="Arial, Helvetica, sans-serif">Thank you so much for being patient and showing me how to do this.. with much help from everyone here is what the results are :<br>
<br>
<b>Patch 1 :<br>
<br>
File : wine-1.0/dlls/wined3d/context.c<br>
<br>
</b>--- context.c 2008-06-26 13:52:57.000000000 -0400<br>
+++ context.c.patch1 2008-06-26 15:19:15.000000000 -0400<br>
@@ -145,9 +145,7 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
<br>
DepthStencilFormat = WINED3DFMT_D24S8;<br>
<br>
- if(DepthStencilFormat) {<br>
- getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);<br>
- }<br>
+ getDepthStencilBits(DepthStencilFormat, &depthBits, &stencilBits);<br>
<br>
/* Find a pixel format which EXACTLY matches our requirements (except for depth) */<br>
for(i=0; i<nCfgs; i++) {<br>
<br>
<b>Patch 2:<br>
<br>
File: </b></font><font face="Arial, Helvetica, sans-serif"><b>wine-1.0/dlls/wined3d/context.c<br>
</b><br>
--- context.c 2008-06-26 13:52:57.000000000 -0400<br>
+++ context.c.patch2 2008-06-26 15:37:25.000000000 -0400<br>
@@ -120,7 +120,9 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
int i = 0;<br>
int nCfgs = This->adapter->nCfgs;<br>
WineD3D_PixelFormat *cfgs = This->adapter->cfgs;<br>
-<br>
+ PIXELFORMATDESCRIPTOR pfd;<br>
+ BOOL exactDepthMatch = TRUE;<br>
+ <br>
TRACE("ColorFormat=%s, DepthStencilFormat=%s, auxBuffers=%d, numSamples=%d, pbuffer=%d, findCompatible=%d\n",<br>
debug_d3dformat(ColorFormat), debug_d3dformat(DepthStencilFormat), auxBuffers, numSamples, pbuffer, findCompatible);<br>
<br>
@@ -151,7 +153,6 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
<br>
/* Find a pixel format which EXACTLY matches our requirements (except for depth) */<br>
for(i=0; i<nCfgs; i++) {<br>
- BOOL exactDepthMatch = TRUE;<br>
cfgs = &This->adapter->cfgs[i];<br>
<br>
/* For now only accept RGBA formats. Perhaps some day we will<br>
@@ -180,13 +181,7 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
if(cfgs->alphaSize != alphaBits)<br>
continue;<br>
<br>
- /* We try to locate a format which matches our requirements exactly. In case of<br>
- * depth it is no problem to emulate 16-bit using e.g. 24-bit, so accept that. */<br>
- if(cfgs->depthSize < depthBits)<br>
- continue;<br>
- else if(cfgs->depthSize > depthBits)<br>
- exactDepthMatch = FALSE;<br>
-<br>
+ <br>
/* In all cases make sure the number of stencil bits matches our requirements<br>
* even when we don't need stencil because it could affect performance EXCEPT<br>
* on cards which don't offer depth formats without stencil like the i915 drivers<br>
@@ -198,6 +193,13 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
if(cfgs->numSamples != numSamples)<br>
continue;<br>
<br>
+ /* We try to locate a format which matches our requirements exactly. In case of<br>
+ * depth it is no problem to emulate 16-bit using e.g. 24-bit, so accept that. */<br>
+ if(cfgs->depthSize < depthBits)<br>
+ continue;<br>
+ else if(cfgs->depthSize > depthBits)<br>
+ exactDepthMatch = FALSE;<br>
+<br>
/* When we have passed all the checks then we have found a format which matches our<br>
* requirements. Note that we only check for a limit number of capabilities right now,<br>
* so there can easily be a dozen of pixel formats which appear to be the 'same' but<br>
@@ -216,12 +218,8 @@ static int WineD3D_ChoosePixelFormat(IWi<br>
}<br>
}<br>
<br>
- /* When findCompatible is set and no suitable format was found, let ChoosePixelFormat choose a pixel format in order not to crash. */<br>
- if(!iPixelFormat && !findCompatible) {<br>
- ERR("Can't find a suitable iPixelFormat\n");<br>
- return FALSE;<br>
- } else if(!iPixelFormat) {<br>
- PIXELFORMATDESCRIPTOR pfd;<br>
+ if(!iPixelFormat) {<br>
+<br>
<br>
TRACE("Falling back to ChoosePixelFormat as we weren't able to find an exactly matching pixel format\n");<br>
/* PixelFormat selection */<br>
<br>
<br>
Chris Ahrendt<br>
<br>
P.S. THANKS everyone.. so now comments please? <G><br>
</font><div id='u8CAA5DE0FD7BBC1-1378-11BA' class='aol_ad_footer'><FONT style="color: black; font: normal 10pt ARIAL, SAN-SERIF;"><HR style="MARGIN-TOP: 10px"><A title="http://toolbar.aol.com/moviefone/download.html?ncid=aolcmp00050000000011" href="http://toolbar.aol.com/moviefone/download.html?ncid=aolcmp00050000000011" target="_blank">Get the Moviefone Toolbar</A>. Showtimes, theaters, movie news, & more!</FONT> </div>