user[4/5]: perform necessary W->A conversion in SPI_SETDESKWALLPAPER

Alexandre Julliard julliard at winehq.org
Wed Jul 12 12:49:42 CDT 2006


Andrew Ziem <ahziem1 at 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 at winehq.org



More information about the wine-devel mailing list