mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 04:13:31 +00:00
[DESK.CPL]
- Don't convert the selected wallpaper if it is already a bitmap. Patch by Ricardo Hanke. CORE-8802 #resolve svn path=/trunk/; revision=66451
This commit is contained in:
@@ -25,6 +25,7 @@ list(APPEND SOURCE
|
||||
|
||||
add_library(desk SHARED
|
||||
${SOURCE}
|
||||
guid.c
|
||||
desk.rc
|
||||
${CMAKE_CURRENT_BINARY_DIR}/desk.def)
|
||||
|
||||
|
||||
@@ -913,6 +913,7 @@ SetWallpaper(PDATA pData)
|
||||
TCHAR szWallpaper[MAX_PATH];
|
||||
GpImage *image;
|
||||
CLSID encoderClsid;
|
||||
GUID guidFormat;
|
||||
size_t length = 0;
|
||||
GpStatus status;
|
||||
|
||||
@@ -956,6 +957,15 @@ SetWallpaper(PDATA pData)
|
||||
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);
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
/* 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 */
|
||||
Reference in New Issue
Block a user