From: Zhiyi Zhang zzhang@codeweavers.com
Fix Cafe Stella (SteamID: 1829980) Flowchart crashes once there are 2 things on it. --- dlls/gdiplus/metafile.c | 7 ++++++- dlls/gdiplus/tests/metafile.c | 1 - 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c index 19d8c0473d7..4394056a293 100644 --- a/dlls/gdiplus/metafile.c +++ b/dlls/gdiplus/metafile.c @@ -2660,7 +2660,12 @@ static GpStatus METAFILE_PlaybackObject(GpMetafile *metafile, UINT flags, UINT d if (pendata->PenDataFlags & PenDataCustomEndCap) { EmfPlusCustomEndCapData *endcap = (EmfPlusCustomEndCapData *)((BYTE *)pendata + offset); - FIXME("PenDataCustomEndCap is not supported.\n"); + if ((status = metafile_deserialize_custom_line_cap((BYTE *)endcap, data_size, &custom_line_cap)) != Ok) + goto penfailed; + status = GdipSetPenCustomEndCap(pen, custom_line_cap); + GdipDeleteCustomLineCap(custom_line_cap); + if (status != Ok) + goto penfailed; offset += FIELD_OFFSET(EmfPlusCustomEndCapData, data) + endcap->CustomEndCapSize; }
diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index cf0d8b7e225..724ac5fc890 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -3987,7 +3987,6 @@ static void test_pen(void) expect(RGB(0xff, 0, 0), color);
color = GetPixel(hdc, 40, 90); - todo_wine flaky /* Win10 + */ expect(RGB(0xff, 0, 0), color);