Commit 0a25dd46 authored by Justin Chevrier's avatar Justin Chevrier Committed by Alexandre Julliard

Move implementation of SysParametersInfo from Ascii to Unicode.

parent 4d6b27ec
......@@ -235,25 +235,30 @@ BOOL WINAPI SetDeskWallPaper( LPCSTR filename )
*
* Set the desktop pattern.
*/
BOOL DESKTOP_SetPattern( LPCSTR pattern )
BOOL DESKTOP_SetPattern( LPCWSTR pattern )
{
int pat[8];
if (hbrushPattern) DeleteObject( hbrushPattern );
hbrushPattern = 0;
memset( pat, 0, sizeof(pat) );
if (pattern && sscanf( pattern, " %d %d %d %d %d %d %d %d",
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
if (pattern)
{
WORD pattern[8];
HBITMAP hbitmap;
int i;
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern );
hbrushPattern = CreatePatternBrush( hbitmap );
DeleteObject( hbitmap );
char buffer[64];
WideCharToMultiByte( CP_ACP, 0, pattern, -1, buffer, sizeof(buffer), NULL, NULL );
if (sscanf( buffer, " %d %d %d %d %d %d %d %d",
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
{
WORD pattern[8];
HBITMAP hbitmap;
int i;
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff;
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern );
hbrushPattern = CreatePatternBrush( hbitmap );
DeleteObject( hbitmap );
}
}
else hbrushPattern = 0;
return TRUE;
}
......@@ -47,7 +47,7 @@ struct builtin_class_descr
/* desktop */
extern BOOL DESKTOP_SetPattern( LPCSTR pattern );
extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
/* icon title */
extern HWND ICONTITLE_Create( HWND hwnd );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment