From 04c7639769edbf9663e468963b27bc01f527e5e8 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Fri, 8 May 2026 11:10:40 +0300 Subject: [PATCH] [GDIPLUS_WINETEST] Fix crash on Vista GdipDrawImageFX isn't available pn Vista --- modules/rostests/winetests/gdiplus/graphics.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/modules/rostests/winetests/gdiplus/graphics.c b/modules/rostests/winetests/gdiplus/graphics.c index dd25dd54fb2..20724e2bad2 100644 --- a/modules/rostests/winetests/gdiplus/graphics.c +++ b/modules/rostests/winetests/gdiplus/graphics.c @@ -31,6 +31,9 @@ #define expectf(expected, got) expectf_((expected), (got), 0.001) static GpStatus (WINAPI *pGdipGraphicsSetAbort)(GpGraphics*,GdiplusAbort*); +#ifdef __REACTOS__ +static GpStatus (WINAPI *pGdipDrawImageFX)(GpGraphics*, GpImage*, GpRectF*, GpMatrix*, CGpEffect*, GpImageAttributes*, GpUnit); +#endif static const REAL mm_per_inch = 25.4; static const REAL point_per_inch = 72.0; @@ -1317,6 +1320,15 @@ static void test_GdipDrawImageFX(void) BYTE buff[400]; HDC hdc; +#ifdef __REACTOS__ + if (!pGdipDrawImageFX) + { + win_skip("GdipDrawImageFX() is not supported.\n"); + return; + } +#define GdipDrawImageFX pGdipDrawImageFX +#endif + if (!(hdc = GetDC( hwnd ))) return; @@ -7498,6 +7510,9 @@ START_TEST(graphics) if (_controlfp_s) _controlfp_s(0, 0, 0x0008001e); pGdipGraphicsSetAbort = (void*)GetProcAddress(gdiplus_mod, "GdipGraphicsSetAbort"); +#ifdef __REACTOS__ + pGdipDrawImageFX = (void*)GetProcAddress(gdiplus_mod, "GdipDrawImageFX"); +#endif memset( &class, 0, sizeof(class) ); class.lpszClassName = "gdiplus_test";