Re: user[4/5]: perform necessary W->A conversion in SPI_SETDESKWALLPAPER
Andrew Ziem <ahziem1(a)mailbolt.com> writes:
9be5813942a86fbbb9549e7437122580727f55cf diff --git a/dlls/user/sysparams.c b/dlls/user/sysparams.c index ab20640..b5e9798 100644 --- a/dlls/user/sysparams.c +++ b/dlls/user/sysparams.c @@ -1324,7 +1324,11 @@ #define WINE_SPI_WARN(x) \ } else { - if (!SetDeskWallPaper( (LPSTR) pvParam )) + char buffer[MAX_PATH]; + SYSPARAMS_Save(SPI_SETDESKWALLPAPER_REGKEY, SPI_SETDESKWALLPAPER_VALNAME, pvParam, fWinIni); + if (!WideCharToMultiByte(CP_ACP, 0, pvParam, -1, buffer, MAX_PATH, NULL, NULL)) + return FALSE; + if (!SetDeskWallPaper( buffer ))
You shouldn't convert W->A, this should be done the other way around, i.e. SetDeskWallPaper should call SystemParametersInfo. -- Alexandre Julliard julliard(a)winehq.org
participants (1)
-
Alexandre Julliard