diff --git a/patches/gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch b/patches/gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch new file mode 100644 index 00000000..b7fcc33e --- /dev/null +++ b/patches/gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch @@ -0,0 +1,40 @@ +From df5c81e67b4f660770f98db3dab2d8cb62329975 Mon Sep 17 00:00:00 2001 +From: Dmitry Timoshkov +Date: Sat, 19 Mar 2016 15:47:10 +0800 +Subject: gdiplus: Implement GdipCreateMetafileFromStream. + +--- + dlls/gdiplus/metafile.c | 17 +++++++++++++++-- + 1 file changed, 15 insertions(+), 2 deletions(-) + +diff --git a/dlls/gdiplus/metafile.c b/dlls/gdiplus/metafile.c +index 922c101..ea9badc 100644 +--- a/dlls/gdiplus/metafile.c ++++ b/dlls/gdiplus/metafile.c +@@ -1139,8 +1139,21 @@ GpStatus WINGDIPAPI GdipCreateMetafileFromFile(GDIPCONST WCHAR *file, + GpStatus WINGDIPAPI GdipCreateMetafileFromStream(IStream *stream, + GpMetafile **metafile) + { +- FIXME("(%p, %p): stub\n", stream, metafile); +- return NotImplemented; ++ GpStatus stat; ++ ++ TRACE("%p %p\n", stream, metafile); ++ ++ stat = GdipLoadImageFromStream(stream, (GpImage **)metafile); ++ if (stat != Ok) return stat; ++ ++ if ((*metafile)->image.type != ImageTypeMetafile) ++ { ++ GdipDisposeImage(&(*metafile)->image); ++ *metafile = NULL; ++ return GenericError; ++ } ++ ++ return Ok; + } + + GpStatus WINGDIPAPI GdipSetMetafileDownLevelRasterizationLimit(GpMetafile *metafile, +-- +2.7.1 + diff --git a/patches/gdiplus-GdipCreateMetafileFromStream/definition b/patches/gdiplus-GdipCreateMetafileFromStream/definition new file mode 100644 index 00000000..fc595784 --- /dev/null +++ b/patches/gdiplus-GdipCreateMetafileFromStream/definition @@ -0,0 +1 @@ +Fixes: [40325] Implement GdipCreateMetafileFromStream diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index e952219d..a1a6c99b 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -150,6 +150,7 @@ patch_enable_all () enable_gdi32_MultiMonitor="$1" enable_gdi32_Path_Metafile="$1" enable_gdi32_Symbol_Truetype_Font="$1" + enable_gdiplus_GdipCreateMetafileFromStream="$1" enable_hal_KeQueryPerformanceCounter="$1" enable_hid_HidP_TranslateUsagesToI8042ScanCodes="$1" enable_hnetcfg_INetFwAuthorizedApplication="$1" @@ -619,6 +620,9 @@ patch_enable () gdi32-Symbol_Truetype_Font) enable_gdi32_Symbol_Truetype_Font="$2" ;; + gdiplus-GdipCreateMetafileFromStream) + enable_gdiplus_GdipCreateMetafileFromStream="$2" + ;; hal-KeQueryPerformanceCounter) enable_hal_KeQueryPerformanceCounter="$2" ;; @@ -3727,6 +3731,21 @@ if test "$enable_gdi32_Symbol_Truetype_Font" -eq 1; then ) >> "$patchlist" fi +# Patchset gdiplus-GdipCreateMetafileFromStream +# | +# | This patchset fixes the following Wine bugs: +# | * [#40325] Implement GdipCreateMetafileFromStream +# | +# | Modified files: +# | * dlls/gdiplus/metafile.c +# | +if test "$enable_gdiplus_GdipCreateMetafileFromStream" -eq 1; then + patch_apply gdiplus-GdipCreateMetafileFromStream/0001-gdiplus-Implement-GdipCreateMetafileFromStream.patch + ( + echo '+ { "Dmitry Timoshkov", "gdiplus: Implement GdipCreateMetafileFromStream.", 1 },'; + ) >> "$patchlist" +fi + # Patchset hal-KeQueryPerformanceCounter # | # | This patchset fixes the following Wine bugs: