diff --git a/README.md b/README.md index a5147316..140c4f2f 100644 --- a/README.md +++ b/README.md @@ -34,9 +34,10 @@ Wine. All those differences are also documented on the Included bug fixes and improvements ----------------------------------- -**Bug fixes and features included in the next upcoming release [13]:** +**Bug fixes and features included in the next upcoming release [14]:** * Add implementation for msidb commandline tool +* BitBlt and StretchDIBits should be marked as hotpatchable * Codepage conversion should fail when destination length is < 0 * Do not trust width/height passed to edit control in WM_SIZE message ([Wine Bug #37542](https://bugs.winehq.org/show_bug.cgi?id=37542)) * Do not use GdipAlloc and GdipFree in internal functions ([Wine Bug #32786](https://bugs.winehq.org/show_bug.cgi?id=32786)) diff --git a/debian/changelog b/debian/changelog index e4d47044..bb19e301 100644 --- a/debian/changelog +++ b/debian/changelog @@ -24,6 +24,7 @@ wine-staging (1.7.52) UNRELEASED; urgency=low _seh_longjmp_unwind4. * Added patch to mark RegOpenKeyExA, RegCloseKey and RegQueryValueExA as hotpatchable. + * Added patch to mark BitBlt and StretchDIBits as hotpatchable. * Removed patch to fix possible memory leak in netprofm init_networks (fixed upstream). * Removed patch for stub of dwmapi.DwmUpdateThumbnailProperties (accepted diff --git a/patches/gdi32-Hotpatching/0001-gdi32-Mark-some-functions-as-hotpatchable.patch b/patches/gdi32-Hotpatching/0001-gdi32-Mark-some-functions-as-hotpatchable.patch new file mode 100644 index 00000000..405b8448 --- /dev/null +++ b/patches/gdi32-Hotpatching/0001-gdi32-Mark-some-functions-as-hotpatchable.patch @@ -0,0 +1,59 @@ +From 3a9c4ea762e13dcd7df42008f9a55eeeac702056 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Michael=20M=C3=BCller?= +Date: Fri, 2 Oct 2015 17:26:58 +0200 +Subject: gdi32: Mark some functions as hotpatchable. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Michael Müller +--- + dlls/gdi32/bitblt.c | 4 ++-- + dlls/gdi32/dib.c | 9 ++++++--- + 2 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c +index 08ebfd9..d427070 100644 +--- a/dlls/gdi32/bitblt.c ++++ b/dlls/gdi32/bitblt.c +@@ -559,8 +559,8 @@ BOOL WINAPI PatBlt( HDC hdc, INT left, INT top, INT width, INT height, DWORD rop + /*********************************************************************** + * BitBlt (GDI32.@) + */ +-BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, +- INT height, HDC hdcSrc, INT xSrc, INT ySrc, DWORD rop ) ++BOOL WINAPI DECLSPEC_HOTPATCH BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, ++ INT height, HDC hdcSrc, INT xSrc, INT ySrc, DWORD rop ) + { + if (!rop_uses_src( rop )) return PatBlt( hdcDst, xDst, yDst, width, height, rop ); + else return StretchBlt( hdcDst, xDst, yDst, width, height, +diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c +index 708a9a8..2817ede 100644 +--- a/dlls/gdi32/dib.c ++++ b/dlls/gdi32/dib.c +@@ -59,6 +59,8 @@ + Search for "Bitmap Structures" in MSDN + */ + ++#include "config.h" ++ + #include + #include + #include +@@ -602,9 +604,10 @@ done: + /*********************************************************************** + * StretchDIBits (GDI32.@) + */ +-INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, INT heightDst, +- INT xSrc, INT ySrc, INT widthSrc, INT heightSrc, const void *bits, +- const BITMAPINFO *bmi, UINT coloruse, DWORD rop ) ++INT WINAPI DECLSPEC_HOTPATCH StretchDIBits( HDC hdc, INT xDst, INT yDst, INT widthDst, INT heightDst, ++ INT xSrc, INT ySrc, INT widthSrc, INT heightSrc, ++ const void *bits, const BITMAPINFO *bmi, UINT coloruse, ++ DWORD rop ) + { + char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )]; + BITMAPINFO *info = (BITMAPINFO *)buffer; +-- +2.5.1 + diff --git a/patches/gdi32-Hotpatching/definition b/patches/gdi32-Hotpatching/definition new file mode 100644 index 00000000..77549433 --- /dev/null +++ b/patches/gdi32-Hotpatching/definition @@ -0,0 +1 @@ +Fixes: BitBlt and StretchDIBits should be marked as hotpatchable diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 07378268..9a4390e7 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -139,6 +139,7 @@ patch_enable_all () enable_fltmgr_Stub_SYS="$1" enable_fonts_Missing_Fonts="$1" enable_gdi32_Default_Palette="$1" + enable_gdi32_Hotpatching="$1" enable_gdi32_Lazy_Font_Initialization="$1" enable_gdi32_MaxPixelFormats="$1" enable_gdi32_MultiMonitor="$1" @@ -516,6 +517,9 @@ patch_enable () gdi32-Default_Palette) enable_gdi32_Default_Palette="$2" ;; + gdi32-Hotpatching) + enable_gdi32_Hotpatching="$2" + ;; gdi32-Lazy_Font_Initialization) enable_gdi32_Lazy_Font_Initialization="$2" ;; @@ -3148,6 +3152,18 @@ if test "$enable_gdi32_Default_Palette" -eq 1; then ) >> "$patchlist" fi +# Patchset gdi32-Hotpatching +# | +# | Modified files: +# | * dlls/gdi32/bitblt.c, dlls/gdi32/dib.c +# | +if test "$enable_gdi32_Hotpatching" -eq 1; then + patch_apply gdi32-Hotpatching/0001-gdi32-Mark-some-functions-as-hotpatchable.patch + ( + echo '+ { "Michael Müller", "gdi32: Mark some functions as hotpatchable.", 1 },'; + ) >> "$patchlist" +fi + # Patchset gdi32-Lazy_Font_Initialization # | # | Modified files: