Hi Stefan,
+ hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, + D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice ); + ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr)); + if (FAILED(hr)) goto cleanup;
(snip)
+ cleanup: + if(pDevice) IDirect3DDevice9_Release(pDevice);
The label cleanup isn't used anywhere except in the failure to create the device. In this case, wouldn't: if (FAILED(hr)) return; be clearer, and omit the unneeded label? There's no reason to release pDevice in creating it failed.
--Juan
____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
Am Donnerstag 15 Februar 2007 19:13 schrieb Juan Lang:
The label cleanup isn't used anywhere except in the failure to create the device. In this case, wouldn't: if (FAILED(hr)) return; be clearer, and omit the unneeded label? There's no reason to release pDevice in creating it failed.
You're right. Its just copypasted from the other tests :-/