- Don't convert the selected wallpaper if it is already a bitmap. Patch by Ricardo Hanke.
CORE-8802 #resolve
svn path=/trunk/; revision=66451
add_library(desk SHARED
${SOURCE}
+ guid.c
desk.rc
${CMAKE_CURRENT_BINARY_DIR}/desk.def)
TCHAR szWallpaper[MAX_PATH];
GpImage *image;
CLSID encoderClsid;
+ GUID guidFormat;
size_t length = 0;
GpStatus status;
return;
}
+ GdipGetImageRawFormat(image, &guidFormat);
+ if (IsEqualGUID(&guidFormat, &ImageFormatBMP))
+ {
+ GdipDisposeImage(image);
+ RegCloseKey(regKey);
+ SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, pData->backgroundItems[pData->backgroundSelection].szFilename, SPIF_UPDATEINIFILE);
+ return;
+ }
+
if (FAILED(GdipGetEncoderClsid(L"image/bmp", &encoderClsid)))
{
GdipDisposeImage(image);
--- /dev/null
+/* DO NOT USE THE PRECOMPILED HEADER FOR THIS FILE! */
+
+#define WIN32_NO_STATuS
+#define _INC_WINDOWS
+#define COM_NO_WINDOWS_H
+
+#include <windef.h>
+#include <winbase.h>
+#include <wingdi.h>
+#include <objbase.h>
+#include <initguid.h>
+#include <gdiplus.h>
+
+/* NO CODE HERE, THIS IS JUST REQUIRED FOR THE GUID DEFINITIONS */