[PATCH] dxgi: 0 / 0 means 0 for a DXGI_RATIONAL
hverbeet at gmail.com
Sun Nov 27 10:25:08 CST 2011
On 26 November 2011 15:52, Eduard - Gabriel Munteanu
<eduard.munteanu at linux360.ro> wrote:
> + if (!rational->Denominator && !rational->Numerator)
> + return 0;
That's pretty much the same as returning 0 when the numerator is 0.
> C_SRCS = \
> - device.c
> + device.c \
> + swapchain.c
I don't think we really need a new test file for this, you can
probably just add it to device.c.
> + hr = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE,
> + NULL, 0, D3D10_SDK_VERSION, &scdesc, swapchain, device);
I suppose you can test D3D10CreateDeviceAndSwapChain() for
completeness if you want, but the interesting part is testing
What happens for cases like "60 / 0"? Do we get an exception, or does
the function return an error? MSDN for DXGI_RATIONAL says that whole
numbers should be represented with a denominator of 1, is something
like "120 / 2" valid?
More information about the wine-devel