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 ) ...@@ -235,25 +235,30 @@ BOOL WINAPI SetDeskWallPaper( LPCSTR filename )
* *
* Set the desktop pattern. * Set the desktop pattern.
*/ */
BOOL DESKTOP_SetPattern( LPCSTR pattern ) BOOL DESKTOP_SetPattern( LPCWSTR pattern )
{ {
int pat[8]; int pat[8];
if (hbrushPattern) DeleteObject( hbrushPattern ); if (hbrushPattern) DeleteObject( hbrushPattern );
hbrushPattern = 0;
memset( pat, 0, sizeof(pat) ); memset( pat, 0, sizeof(pat) );
if (pattern && sscanf( pattern, " %d %d %d %d %d %d %d %d", if (pattern)
&pat[0], &pat[1], &pat[2], &pat[3],
&pat[4], &pat[5], &pat[6], &pat[7] ))
{ {
WORD pattern[8]; char buffer[64];
HBITMAP hbitmap; WideCharToMultiByte( CP_ACP, 0, pattern, -1, buffer, sizeof(buffer), NULL, NULL );
int i; if (sscanf( buffer, " %d %d %d %d %d %d %d %d",
&pat[0], &pat[1], &pat[2], &pat[3],
for (i = 0; i < 8; i++) pattern[i] = pat[i] & 0xffff; &pat[4], &pat[5], &pat[6], &pat[7] ))
hbitmap = CreateBitmap( 8, 8, 1, 1, (LPSTR)pattern ); {
hbrushPattern = CreatePatternBrush( hbitmap ); WORD pattern[8];
DeleteObject( hbitmap ); 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; return TRUE;
} }
...@@ -47,7 +47,7 @@ struct builtin_class_descr ...@@ -47,7 +47,7 @@ struct builtin_class_descr
/* desktop */ /* desktop */
extern BOOL DESKTOP_SetPattern( LPCSTR pattern ); extern BOOL DESKTOP_SetPattern( LPCWSTR pattern );
/* icon title */ /* icon title */
extern HWND ICONTITLE_Create( HWND hwnd ); 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