user[5/5]: propagate error in SetDeskWallPaper()
Andrew Ziem
ahziem1 at mailbolt.com
Sun Jul 9 21:15:54 CDT 2006
diff --git a/dlls/user/desktop.c b/dlls/user/desktop.c
index a26d113..231694a 100644
--- a/dlls/user/desktop.c
+++ b/dlls/user/desktop.c
@@ -206,12 +206,14 @@ BOOL WINAPI SetDeskWallPaper( LPCSTR fil
HBITMAP hbitmap;
HDC hdc;
char buffer[256];
+ int def = 0;
if ((LPCSTR)NULL == filename || (LPCSTR)SETWALLPAPER_DEFAULT == filename)
{
/* revert to default wallpaper */
GetProfileStringA( "desktop", "WallPaper", "(None)", buffer, 256 );
filename = buffer;
+ def = 1;
}
else if ('\0' == filename[0])
{
@@ -235,7 +237,7 @@ BOOL WINAPI SetDeskWallPaper( LPCSTR fil
bitmapSize.cx = (bmp.bmWidth != 0) ? bmp.bmWidth : 1;
bitmapSize.cy = (bmp.bmHeight != 0) ? bmp.bmHeight : 1;
}
- return TRUE;
+ return ( 0 != hbitmap || def );
}
--
1.4.0
More information about the wine-patches
mailing list