On Sun, Sep 23, 2012 at 10:40 PM, Ričardas Barkauskas
<rbarkauskas(a)codeweavers.com> wrote:
> +struct refresh_rates refresh_list[] =
> +{
> + {60, 60, FALSE, FALSE},
> + {60, 0, TRUE, FALSE},
> + {60, 1, TRUE, TRUE},
> + { 0, 60, TRUE, FALSE},
> + { 0, 0, TRUE, FALSE},
> +};
It's probably better to declare it inside test_createswapchain(). It
could also be static const.
> + hr = IDXGISwapChain_Release(swapchain);
> + ok(hr == 0, "Release failed, hr %d.\n", hr);
It should be assigned to refcount.
> + hr = IDXGIFactory_Release(factory);
> + ok(SUCCEEDED(hr), "Release failed, hr %#x.\n", hr);
> +
> + hr = IDXGIAdapter_Release(adapter);
> + ok(SUCCEEDED(hr), "Release failed, hr %#x.\n", hr);
> +
> + hr = IUnknown_Release(obj);
> + ok(SUCCEEDED(hr), "Release failed, hr %#x.\n", hr);
Release doesn't return HRESULT and the value returned by Release
shouldn't be tested with SUCCEEDED.
refcount = IDXGIFactory_Release(factory);
ok(!refcount, "ID3DXGIFactory has %u references left\n", refcount);