From: Ziqing Hui zhui@codeweavers.com
Signed-off-by: Ziqing Hui zhui@codeweavers.com --- dlls/d2d1/factory.c | 8 ++++---- dlls/d2d1/tests/d2d1.c | 2 +- include/d2derr.h | 1 + 3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/dlls/d2d1/factory.c b/dlls/d2d1/factory.c index a160d7071c2..6eeea8e70ae 100644 --- a/dlls/d2d1/factory.c +++ b/dlls/d2d1/factory.c @@ -634,7 +634,7 @@ static HRESULT parse_effect_get_next_xml_node(IXmlReader *reader, XmlNodeType ex continue;
if (expected_type != XmlNodeType_None && node_type != expected_type) - return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + return D2DERR_NOT_FOUND;
if (expected_name) { @@ -642,7 +642,7 @@ static HRESULT parse_effect_get_next_xml_node(IXmlReader *reader, XmlNodeType ex return hr;
if (wcscmp(node_name, expected_name)) - return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + return D2DERR_NOT_FOUND; }
if (depth) @@ -833,7 +833,7 @@ static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registr { if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr; if (node_type == XmlNodeType_EndElement) continue; - if (node_type != XmlNodeType_Element) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + if (node_type != XmlNodeType_Element) return D2DERR_NOT_FOUND;
if (FAILED(hr = parse_effect_get_attribute(reader, L"name", &name))) return hr;
@@ -846,7 +846,7 @@ static HRESULT parse_effect_inputs(IXmlReader *reader, struct d2d_effect_registr *(UINT32 *)(effect->properties.data.ptr + inputs->data.offset) = input_count;
if (FAILED(hr = IXmlReader_GetNodeType(reader, &node_type))) return hr; - if (node_type != XmlNodeType_EndElement) return HRESULT_FROM_WIN32(ERROR_NOT_FOUND); + if (node_type != XmlNodeType_EndElement) return D2DERR_NOT_FOUND;
return S_OK; } diff --git a/dlls/d2d1/tests/d2d1.c b/dlls/d2d1/tests/d2d1.c index 3a38d593625..9a4b7a82052 100644 --- a/dlls/d2d1/tests/d2d1.c +++ b/dlls/d2d1/tests/d2d1.c @@ -10793,7 +10793,7 @@ static void test_effect_register(BOOL d3d11) {effect_xml_b, S_OK}, {effect_xml_c, S_OK}, {effect_xml_minimum, S_OK}, - {effect_xml_without_version, HRESULT_FROM_WIN32(ERROR_NOT_FOUND)}, + {effect_xml_without_version, D2DERR_NOT_FOUND}, {effect_xml_without_inputs, E_INVALIDARG}, {effect_xml_without_name, E_INVALIDARG}, {effect_xml_without_author, E_INVALIDARG}, diff --git a/include/d2derr.h b/include/d2derr.h index b31d0aff515..8a03194c1e4 100644 --- a/include/d2derr.h +++ b/include/d2derr.h @@ -19,6 +19,7 @@ #ifndef __WINE_D2DERR_H #define __WINE_D2DERR_H
+#define D2DERR_NOT_FOUND HRESULT_FROM_WIN32(ERROR_NOT_FOUND) #define D2DERR_FILE_NOT_FOUND HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) #define D2DERR_INSUFFICIENT_BUFFER HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER) #define D2DERR_UNSUPPORTED_PIXEL_FORMAT WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT