Re: [PATCH 3/7] ddraw: Fix IDirectDraw_CreateSurface's invalid descriptor error code.
On 15 February 2017 at 07:53, Alex Henrie <alexhenrie24(a)gmail.com> wrote:
@@ -3000,7 +3000,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, { WARN("Application supplied invalid surface descriptor\n"); wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + return E_INVALIDARG; Did you verify the test fails without this change? How is DDERR_INVALIDPARAMS defined?
2017-02-15 6:49 GMT-07:00 Henri Verbeet <hverbeet(a)gmail.com>:
On 15 February 2017 at 07:53, Alex Henrie <alexhenrie24(a)gmail.com> wrote:
@@ -3000,7 +3000,7 @@ static HRESULT WINAPI ddraw1_CreateSurface(IDirectDraw *iface, { WARN("Application supplied invalid surface descriptor\n"); wined3d_mutex_unlock(); - return DDERR_INVALIDPARAMS; + return E_INVALIDARG; Did you verify the test fails without this change? How is DDERR_INVALIDPARAMS defined?
You're right; these patches are unnecessary. ddraw.h has: #define DDERR_INVALIDPARAMS E_INVALIDARG Which of the two is preferred for ddraw code? -Aex
Am 2017-02-15 um 16:17 schrieb Alex Henrie:
Which of the two is preferred for ddraw code? We generally use DDERR_INVALIDPARAMS.
One could argue that an inherited method like QueryInterface should return E_INVALIDARG instead, but this is all very academic. I'd say just keep what the existing code has.
participants (3)
-
Alex Henrie -
Henri Verbeet -
Stefan Dösinger