On 05/02/06, Vitaly Budovski vbudovsk@cs.rmit.edu.au wrote:
Can I have some feedback on the attached patch? I'm not entirely sure it's correct.
Thanks,
Vitaly
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index 7aa8d5d..8394362 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -1245,6 +1245,13 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceM BOOL Windowed, D3DMULTISAMPLE_TYPE MultiSampleType, DWORD* pQualityLevels) {
IWineD3DImpl *This = (IWineD3DImpl *)iface;
- HDC deviceContext;
- Display * pDisplay;
- GLXFBConfig * pConfig;
- int attributeList[5] = {GLX_SAMPLE_BUFFERS_ARB, 1, GLX_SAMPLES_ARB, MultiSampleType, 0};
- int configCount;
- int attributeValue;
- TRACE_(d3d_caps)("(%p)-> (STUB) (Adptr:%d, DevType:(%x,%s), SurfFmt:(%x,%s), Win?%d, MultiSamp:%x, pQual:%p)\n", This, Adapter,
@@ -1267,7 +1274,32 @@ HRESULT WINAPI IWineD3DImpl_CheckDeviceM *pQualityLevels = 1; /* Guess at a value! */ }
- if (D3DMULTISAMPLE_NONE == MultiSampleType) return D3D_OK;
- if(D3DMULTISAMPLE_NONE == MultiSampleType) return D3D_OK;
- /* Get the display */
- deviceContext = GetDC(0);
- pDisplay = get_display(deviceContext);
- ENTER_GL();
- pConfig = glXChooseFBConfig(pDisplay, 0, attributeList, &configCount);
- if(pConfig) {
if(!glXGetFBConfigAttrib(pDisplay, *pConfig, GLX_SAMPLES, &attributeValue)) {
XFree(pConfig);
LEAVE_GL();
ReleaseDC(0, deviceContext);
return D3D_OK;
}
- } else {
FIXME("Error retrieving FBConfig\n");
- }
- XFree(pConfig);
- LEAVE_GL();
- ReleaseDC(0, deviceContext);
- return D3DERR_NOTAVAILABLE;
}
What is the patch supposed to do? Did you verify that it does that?