mirror of
https://github.com/reactos/reactos.git
synced 2025-06-02 07:56:16 +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:
parent
2aae46eafa
commit
d733548fb4
3 changed files with 25 additions and 0 deletions
|
@ -25,6 +25,7 @@ list(APPEND SOURCE
|
||||||
|
|
||||||
add_library(desk SHARED
|
add_library(desk SHARED
|
||||||
${SOURCE}
|
${SOURCE}
|
||||||
|
guid.c
|
||||||
desk.rc
|
desk.rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/desk.def)
|
${CMAKE_CURRENT_BINARY_DIR}/desk.def)
|
||||||
|
|
||||||
|
|
|
@ -913,6 +913,7 @@ SetWallpaper(PDATA pData)
|
||||||
TCHAR szWallpaper[MAX_PATH];
|
TCHAR szWallpaper[MAX_PATH];
|
||||||
GpImage *image;
|
GpImage *image;
|
||||||
CLSID encoderClsid;
|
CLSID encoderClsid;
|
||||||
|
GUID guidFormat;
|
||||||
size_t length = 0;
|
size_t length = 0;
|
||||||
GpStatus status;
|
GpStatus status;
|
||||||
|
|
||||||
|
@ -956,6 +957,15 @@ SetWallpaper(PDATA pData)
|
||||||
return;
|
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)))
|
if (FAILED(GdipGetEncoderClsid(L"image/bmp", &encoderClsid)))
|
||||||
{
|
{
|
||||||
GdipDisposeImage(image);
|
GdipDisposeImage(image);
|
||||||
|
|
14
reactos/dll/cpl/desk/guid.c
Normal file
14
reactos/dll/cpl/desk/guid.c
Normal file
|
@ -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 */
|
Loading…
Reference in a new issue