Make 'yank-media' on MS-Windows require native image APIs

* src/w32select.c (convert_dibv5_to_png) [!HAVE_NATIVE_IMAGE_API]:
Fail if GDI+ cannot be used.  Patch by Cecilio Pardo
<cpardo@imayhem.com>.  (Bug#71909)

* etc/NEWS: Mention this dependency.
This commit is contained in:
Eli Zaretskii 2024-11-05 14:29:02 +02:00
parent a0f8fb806f
commit 8a7910fb67
2 changed files with 7 additions and 1 deletions

View file

@ -834,7 +834,9 @@ color Emoji font installed on your system for the 'emoji' script.
+++
** Emacs on MS-Windows now supports 'yank-media'.
This command inserts clipboard data of different formats into the
current buffer, if the major mode supports it.
current buffer, if the major mode supports it. (Support for
'yank-media' will be unavailable on MS-Windows if Emacs was configured
'--without-native-image-api'.)

View file

@ -825,6 +825,7 @@ static const char *stdfmt_name[] = {
static bool
convert_dibv5_to_png (char *data, int size, char *temp_file)
{
#ifdef HAVE_NATIVE_IMAGE_API
CLSID clsid_png;
if (!w32_gdiplus_startup ()
@ -858,6 +859,9 @@ convert_dibv5_to_png (char *data, int size, char *temp_file)
if (status != Ok)
return false;
return true;
#else /* !HAVE_NATIVE_IMAGE_API */
return false;
#endif
}
static int