Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
0a25dd46
Commit
0a25dd46
authored
Mar 04, 2004
by
Justin Chevrier
Committed by
Alexandre Julliard
Mar 04, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move implementation of SysParametersInfo from Ascii to Unicode.
parent
4d6b27ec
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
343 additions
and
306 deletions
+343
-306
desktop.c
controls/desktop.c
+18
-13
controls.h
dlls/user/controls.h
+1
-1
sysparams.c
windows/sysparams.c
+324
-292
No files found.
controls/desktop.c
View file @
0a25dd46
...
@@ -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
(
LPC
W
STR
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
;
}
}
dlls/user/controls.h
View file @
0a25dd46
...
@@ -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
(
LPC
W
STR
pattern
);
/* icon title */
/* icon title */
extern
HWND
ICONTITLE_Create
(
HWND
hwnd
);
extern
HWND
ICONTITLE_Create
(
HWND
hwnd
);
...
...
windows/sysparams.c
View file @
0a25dd46
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include "controls.h"
#include "controls.h"
#include "user.h"
#include "user.h"
#include "wine/unicode.h"
#include "wine/debug.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
system
);
WINE_DEFAULT_DEBUG_CHANNEL
(
system
);
...
@@ -75,69 +76,94 @@ WINE_DEFAULT_DEBUG_CHANNEL(system);
...
@@ -75,69 +76,94 @@ WINE_DEFAULT_DEBUG_CHANNEL(system);
* "SET" action names, value names are created by adding "_REG_NAME"
* "SET" action names, value names are created by adding "_REG_NAME"
* to the "SET" action name.
* to the "SET" action name.
*/
*/
#define SPI_SETBEEP_REGKEY "Control Panel\\Sound"
static
const
WCHAR
SPI_SETBEEP_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'S'
,
'o'
,
'u'
,
'n'
,
'd'
,
0
};
#define SPI_SETBEEP_VALNAME "Beep"
static
const
WCHAR
SPI_SETBEEP_VALNAME
[]
=
{
'B'
,
'e'
,
'e'
,
'p'
,
0
};
#define SPI_SETMOUSE_REGKEY "Control Panel\\Mouse"
static
const
WCHAR
SPI_SETMOUSE_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
#define SPI_SETMOUSE_VALNAME1 "MouseThreshold1"
static
const
WCHAR
SPI_SETMOUSE_VALNAME1
[]
=
{
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
'T'
,
'h'
,
'r'
,
'e'
,
's'
,
'h'
,
'o'
,
'l'
,
'd'
,
'1'
,
0
};
#define SPI_SETMOUSE_VALNAME2 "MouseThreshold2"
static
const
WCHAR
SPI_SETMOUSE_VALNAME2
[]
=
{
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
'T'
,
'h'
,
'r'
,
'e'
,
's'
,
'h'
,
'o'
,
'l'
,
'd'
,
'2'
,
0
};
#define SPI_SETMOUSE_VALNAME3 "MouseSpeed"
static
const
WCHAR
SPI_SETMOUSE_VALNAME3
[]
=
{
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
'S'
,
'p'
,
'e'
,
'e'
,
'd'
,
0
};
#define SPI_SETBORDER_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETBORDER_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETBORDER_VALNAME "BorderWidth"
static
const
WCHAR
SPI_SETBORDER_VALNAME
[]
=
{
'B'
,
'o'
,
'r'
,
'd'
,
'e'
,
'r'
,
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
#define SPI_SETKEYBOARDSPEED_REGKEY "Control Panel\\Keyboard"
static
const
WCHAR
SPI_SETKEYBOARDSPEED_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
0
};
#define SPI_SETKEYBOARDSPEED_VALNAME "KeyboardSpeed"
static
const
WCHAR
SPI_SETKEYBOARDSPEED_VALNAME
[]
=
{
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
'S'
,
'p'
,
'e'
,
'e'
,
'd'
,
0
};
#define SPI_ICONHORIZONTALSPACING_REGKEY "Control Panel\\Desktop\\WindowMetrics"
static
const
WCHAR
SPI_ICONHORIZONTALSPACING_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
'\\'
,
#define SPI_ICONHORIZONTALSPACING_VALNAME "IconSpacing"
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
'M'
,
'e'
,
't'
,
'r'
,
'i'
,
'c'
,
's'
,
0
};
#define SPI_SETSCREENSAVETIMEOUT_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_ICONHORIZONTALSPACING_VALNAME
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
'S'
,
'p'
,
'a'
,
'c'
,
'i'
,
'n'
,
'g'
,
0
};
#define SPI_SETSCREENSAVETIMEOUT_VALNAME "ScreenSaveTimeOut"
static
const
WCHAR
SPI_SETSCREENSAVETIMEOUT_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETSCREENSAVEACTIVE_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETSCREENSAVETIMEOUT_VALNAME
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'S'
,
'a'
,
'v'
,
'e'
,
'T'
,
'i'
,
'm'
,
'e'
,
'O'
,
'u'
,
't'
,
0
};
#define SPI_SETSCREENSAVEACTIVE_VALNAME "ScreenSaveActive"
static
const
WCHAR
SPI_SETSCREENSAVEACTIVE_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETGRIDGRANULARITY_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETSCREENSAVEACTIVE_VALNAME
[]
=
{
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'S'
,
'a'
,
'v'
,
'e'
,
'A'
,
'c'
,
't'
,
'i'
,
'v'
,
'e'
,
0
};
#define SPI_SETGRIDGRANULARITY_VALNAME "GridGranularity"
static
const
WCHAR
SPI_SETGRIDGRANULARITY_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETKEYBOARDDELAY_REGKEY "Control Panel\\Keyboard"
static
const
WCHAR
SPI_SETGRIDGRANULARITY_VALNAME
[]
=
{
'G'
,
'r'
,
'i'
,
'd'
,
'G'
,
'r'
,
'a'
,
'n'
,
'u'
,
'l'
,
'a'
,
'r'
,
'i'
,
't'
,
'y'
,
0
};
#define SPI_SETKEYBOARDDELAY_VALNAME "KeyboardDelay"
static
const
WCHAR
SPI_SETKEYBOARDDELAY_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
0
};
#define SPI_ICONVERTICALSPACING_REGKEY "Control Panel\\Desktop\\WindowMetrics"
static
const
WCHAR
SPI_SETKEYBOARDDELAY_VALNAME
[]
=
{
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
'D'
,
'e'
,
'l'
,
'a'
,
'y'
,
0
};
#define SPI_ICONVERTICALSPACING_VALNAME "IconVerticalSpacing"
static
const
WCHAR
SPI_ICONVERTICALSPACING_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
'\\'
,
#define SPI_SETICONTITLEWRAP_REGKEY1 "Control Panel\\Desktop\\WindowMetrics"
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
'M'
,
'e'
,
't'
,
'r'
,
'i'
,
'c'
,
's'
,
0
};
#define SPI_SETICONTITLEWRAP_REGKEY2 "Control Panel\\Desktop"
static
const
WCHAR
SPI_ICONVERTICALSPACING_VALNAME
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
'V'
,
'e'
,
'r'
,
't'
,
'i'
,
'c'
,
'a'
,
'l'
,
'S'
,
'p'
,
'a'
,
'c'
,
'i'
,
'n'
,
'g'
,
0
};
#define SPI_SETICONTITLEWRAP_VALNAME "IconTitleWrap"
static
const
WCHAR
SPI_SETICONTITLEWRAP_REGKEY1
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
'\\'
,
#define SPI_SETMENUDROPALIGNMENT_REGKEY1 "Software\\Microsoft\\Windows NT\\CurrentVersion\\Windows"
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
'M'
,
'e'
,
't'
,
'r'
,
'i'
,
'c'
,
's'
,
0
};
#define SPI_SETMENUDROPALIGNMENT_REGKEY2 "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETICONTITLEWRAP_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETMENUDROPALIGNMENT_VALNAME "MenuDropAlignment"
static
const
WCHAR
SPI_SETICONTITLEWRAP_VALNAME
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
'T'
,
'i'
,
't'
,
'l'
,
'e'
,
'W'
,
'r'
,
'a'
,
'p'
,
0
};
#define SPI_SETDOUBLECLKWIDTH_REGKEY1 "Control Panel\\Mouse"
static
const
WCHAR
SPI_SETMENUDROPALIGNMENT_REGKEY1
[]
=
{
'S'
,
'o'
,
'f'
,
't'
,
'w'
,
'a'
,
'r'
,
'e'
,
'\\'
,
#define SPI_SETDOUBLECLKWIDTH_REGKEY2 "Control Panel\\Desktop"
'M'
,
'i'
,
'c'
,
'r'
,
'o'
,
's'
,
'o'
,
'f'
,
't'
,
'\\'
,
#define SPI_SETDOUBLECLKWIDTH_VALNAME "DoubleClickWidth"
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
#define SPI_SETDOUBLECLKHEIGHT_REGKEY1 "Control Panel\\Mouse"
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
#define SPI_SETDOUBLECLKHEIGHT_REGKEY2 "Control Panel\\Desktop"
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
#define SPI_SETDOUBLECLKHEIGHT_VALNAME "DoubleClickHeight"
static
const
WCHAR
SPI_SETMENUDROPALIGNMENT_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETDOUBLECLICKTIME_REGKEY "Control Panel\\Mouse"
static
const
WCHAR
SPI_SETMENUDROPALIGNMENT_VALNAME
[]
=
{
'M'
,
'e'
,
'n'
,
'u'
,
'D'
,
'r'
,
'o'
,
'p'
,
'A'
,
'l'
,
'i'
,
'g'
,
'n'
,
'm'
,
'e'
,
'n'
,
't'
,
0
};
#define SPI_SETDOUBLECLICKTIME_VALNAME "DoubleClickSpeed"
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_REGKEY1
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
#define SPI_SETMOUSEBUTTONSWAP_REGKEY "Control Panel\\Mouse"
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETMOUSEBUTTONSWAP_VALNAME "SwapMouseButtons"
static
const
WCHAR
SPI_SETDOUBLECLKWIDTH_VALNAME
[]
=
{
'D'
,
'o'
,
'u'
,
'b'
,
'l'
,
'e'
,
'C'
,
'l'
,
'i'
,
'c'
,
'k'
,
'W'
,
'i'
,
'd'
,
't'
,
'h'
,
0
};
#define SPI_SETDRAGFULLWINDOWS_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETDOUBLECLKHEIGHT_REGKEY1
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
#define SPI_SETDRAGFULLWINDOWS_VALNAME "DragFullWindows"
static
const
WCHAR
SPI_SETDOUBLECLKHEIGHT_REGKEY2
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETWORKAREA_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETDOUBLECLKHEIGHT_VALNAME
[]
=
{
'D'
,
'o'
,
'u'
,
'b'
,
'l'
,
'e'
,
'C'
,
'l'
,
'i'
,
'c'
,
'k'
,
'H'
,
'e'
,
'i'
,
'g'
,
'h'
,
't'
,
0
};
#define SPI_SETWORKAREA_VALNAME "WINE_WorkArea"
static
const
WCHAR
SPI_SETDOUBLECLICKTIME_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
#define SPI_SETSHOWSOUNDS_REGKEY "Control Panel\\Accessibility\\ShowSounds"
static
const
WCHAR
SPI_SETDOUBLECLICKTIME_VALNAME
[]
=
{
'D'
,
'o'
,
'u'
,
'b'
,
'l'
,
'e'
,
'C'
,
'l'
,
'i'
,
'c'
,
'k'
,
'S'
,
'p'
,
'e'
,
'e'
,
'd'
,
0
};
#define SPI_SETSHOWSOUNDS_VALNAME "On"
static
const
WCHAR
SPI_SETMOUSEBUTTONSWAP_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
0
};
#define SPI_SETDESKWALLPAPER_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETMOUSEBUTTONSWAP_VALNAME
[]
=
{
'S'
,
'w'
,
'a'
,
'p'
,
'M'
,
'o'
,
'u'
,
's'
,
'e'
,
'B'
,
'u'
,
't'
,
't'
,
'o'
,
'n'
,
's'
,
0
};
#define SPI_SETDESKWALLPAPER_VALNAME "Wallpaper"
static
const
WCHAR
SPI_SETDRAGFULLWINDOWS_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETFONTSMOOTHING_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETDRAGFULLWINDOWS_VALNAME
[]
=
{
'D'
,
'r'
,
'a'
,
'g'
,
'F'
,
'u'
,
'l'
,
'l'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
0
};
#define SPI_SETFONTSMOOTHING_VALNAME "FontSmoothing"
static
const
WCHAR
SPI_SETWORKAREA_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_USERPREFERENCEMASK_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETWORKAREA_VALNAME
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'W'
,
'o'
,
'r'
,
'k'
,
'A'
,
'r'
,
'e'
,
'a'
,
0
};
#define SPI_USERPREFERENCEMASK_VALNAME "UserPreferencemask"
static
const
WCHAR
SPI_SETSHOWSOUNDS_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
#define SPI_SETLISTBOXSMOOTHSCROLLING_REGKEY "Control Panel\\Desktop"
'A'
,
'c'
,
'c'
,
'e'
,
's'
,
's'
,
'i'
,
'b'
,
'i'
,
'l'
,
'i'
,
't'
,
'y'
,
'\\'
,
#define SPI_SETLISTBOXSMOOTHSCROLLING_VALNAME "SmoothScroll"
'S'
,
'h'
,
'o'
,
'w'
,
'S'
,
'o'
,
'u'
,
'n'
,
'd'
,
's'
,
0
};
static
const
WCHAR
SPI_SETSHOWSOUNDS_VALNAME
[]
=
{
'O'
,
'n'
,
0
};
static
const
WCHAR
SPI_SETDESKWALLPAPER_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_SETDESKWALLPAPER_VALNAME
[]
=
{
'W'
,
'a'
,
'l'
,
'l'
,
'p'
,
'a'
,
'p'
,
'e'
,
'r'
,
0
};
static
const
WCHAR
SPI_SETFONTSMOOTHING_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_SETFONTSMOOTHING_VALNAME
[]
=
{
'F'
,
'o'
,
'n'
,
't'
,
'S'
,
'm'
,
'o'
,
'o'
,
't'
,
'h'
,
'i'
,
'n'
,
'g'
,
0
};
static
const
WCHAR
SPI_USERPREFERENCEMASK_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_USERPREFERENCEMASK_VALNAME
[]
=
{
'U'
,
's'
,
'e'
,
'r'
,
'P'
,
'r'
,
'e'
,
'f'
,
'e'
,
'r'
,
'e'
,
'n'
,
'c'
,
'e'
,
'm'
,
'a'
,
's'
,
'k'
,
0
};
static
const
WCHAR
SPI_SETLISTBOXSMOOTHSCROLLING_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
SPI_SETLISTBOXSMOOTHSCROLLING_VALNAME
[]
=
{
'S'
,
'm'
,
'o'
,
'o'
,
't'
,
'h'
,
'S'
,
'c'
,
'r'
,
'o'
,
'l'
,
'l'
,
0
};
/* FIXME - real values */
/* FIXME - real values */
#define SPI_SETKEYBOARDPREF_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETKEYBOARDPREF_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETKEYBOARDPREF_VALNAME "WINE_KeyboardPref"
static
const
WCHAR
SPI_SETKEYBOARDPREF_VALNAME
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'K'
,
'e'
,
'y'
,
'b'
,
'o'
,
'a'
,
'r'
,
'd'
,
'P'
,
'r'
,
'e'
,
'f'
,
0
};
#define SPI_SETSCREENREADER_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETSCREENREADER_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETSCREENREADER_VALNAME "WINE_ScreenReader"
static
const
WCHAR
SPI_SETSCREENREADER_VALNAME
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'R'
,
'e'
,
'a'
,
'd'
,
'e'
,
'r'
,
0
};
#define SPI_SETSCREENSAVERRUNNING_REGKEY "Control Panel\\Desktop"
static
const
WCHAR
SPI_SETSCREENSAVERRUNNING_REGKEY
[]
=
{
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
' '
,
'P'
,
'a'
,
'n'
,
'e'
,
'l'
,
'\\'
,
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
#define SPI_SETSCREENSAVERRUNNING_VALNAME "WINE_ScreenSaverRunning"
static
const
WCHAR
SPI_SETSCREENSAVERRUNNING_VALNAME
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'_'
,
'S'
,
'c'
,
'r'
,
'e'
,
'e'
,
'n'
,
'S'
,
'a'
,
'v'
,
'e'
,
'r'
,
'R'
,
'u'
,
'n'
,
'n'
,
'i'
,
'n'
,
'g'
,
0
};
/* volatile registry branch under CURRENT_USER_REGKEY for temporary values storage */
/* volatile registry branch under CURRENT_USER_REGKEY for temporary values storage */
#define WINE_CURRENT_USER_REGKEY "Wine"
static
const
WCHAR
WINE_CURRENT_USER_REGKEY
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
0
};
static
const
WCHAR
Yes
[]
=
{
'Y'
,
'e'
,
's'
,
0
};
static
const
WCHAR
No
[]
=
{
'N'
,
'o'
,
0
};
static
const
WCHAR
Desktop
[]
=
{
'D'
,
'e'
,
's'
,
'k'
,
't'
,
'o'
,
'p'
,
0
};
static
const
WCHAR
Pattern
[]
=
{
'P'
,
'a'
,
't'
,
't'
,
'e'
,
'r'
,
'n'
,
0
};
static
const
WCHAR
MenuFont
[]
=
{
'M'
,
'e'
,
'n'
,
'u'
,
'F'
,
'o'
,
'n'
,
't'
,
0
};
static
const
WCHAR
MenuFontSize
[]
=
{
'M'
,
'e'
,
'n'
,
'u'
,
'F'
,
'o'
,
'n'
,
't'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
System
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
0
};
static
const
WCHAR
IconTitleSize
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
'T'
,
'i'
,
't'
,
'l'
,
'e'
,
'S'
,
'i'
,
'z'
,
'e'
,
0
};
static
const
WCHAR
IconTitleFaceName
[]
=
{
'I'
,
'c'
,
'o'
,
'n'
,
'T'
,
'i'
,
't'
,
'l'
,
'e'
,
'F'
,
'a'
,
'c'
,
'e'
,
'N'
,
'a'
,
'm'
,
'e'
,
0
};
static
const
WCHAR
defPattern
[]
=
{
'1'
,
'7'
,
'0'
,
' '
,
'8'
,
'5'
,
' '
,
'1'
,
'7'
,
'0'
,
' '
,
'8'
,
'5'
,
' '
,
'1'
,
'7'
,
'0'
,
' '
,
'8'
,
'5'
,
' '
,
'1'
,
'7'
,
'0'
,
' '
,
'8'
,
'5'
,
0
};
static
const
WCHAR
CSu
[]
=
{
'%'
,
'u'
,
0
};
static
const
WCHAR
CSd
[]
=
{
'%'
,
'd'
,
0
};
/* Indicators whether system parameter value is loaded */
/* Indicators whether system parameter value is loaded */
static
char
spi_loaded
[
SPI_WINE_IDX
+
1
];
static
char
spi_loaded
[
SPI_WINE_IDX
+
1
];
...
@@ -202,23 +228,23 @@ static void SYSPARAMS_LogFont32ATo16( const LOGFONTA* font32, LPLOGFONT16 font16
...
@@ -202,23 +228,23 @@ static void SYSPARAMS_LogFont32ATo16( const LOGFONTA* font32, LPLOGFONT16 font16
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
lstrcpynA
(
font16
->
lfFaceName
,
font32
->
lfFaceName
,
LF_FACESIZE
);
}
}
static
void
SYSPARAMS_LogFont32
ATo32W
(
const
LOGFONTA
*
font32A
,
LPLOGFONTW
font32W
)
static
void
SYSPARAMS_LogFont32
WTo32A
(
const
LOGFONTW
*
font32W
,
LPLOGFONTA
font32A
)
{
{
font32
W
->
lfHeight
=
font32A
->
lfHeight
;
font32
A
->
lfHeight
=
font32W
->
lfHeight
;
font32
W
->
lfWidth
=
font32A
->
lfWidth
;
font32
A
->
lfWidth
=
font32W
->
lfWidth
;
font32
W
->
lfEscapement
=
font32A
->
lfEscapement
;
font32
A
->
lfEscapement
=
font32W
->
lfEscapement
;
font32
W
->
lfOrientation
=
font32A
->
lfOrientation
;
font32
A
->
lfOrientation
=
font32W
->
lfOrientation
;
font32
W
->
lfWeight
=
font32A
->
lfWeight
;
font32
A
->
lfWeight
=
font32W
->
lfWeight
;
font32
W
->
lfItalic
=
font32A
->
lfItalic
;
font32
A
->
lfItalic
=
font32W
->
lfItalic
;
font32
W
->
lfUnderline
=
font32A
->
lfUnderline
;
font32
A
->
lfUnderline
=
font32W
->
lfUnderline
;
font32
W
->
lfStrikeOut
=
font32A
->
lfStrikeOut
;
font32
A
->
lfStrikeOut
=
font32W
->
lfStrikeOut
;
font32
W
->
lfCharSet
=
font32A
->
lfCharSet
;
font32
A
->
lfCharSet
=
font32W
->
lfCharSet
;
font32
W
->
lfOutPrecision
=
font32A
->
lfOutPrecision
;
font32
A
->
lfOutPrecision
=
font32W
->
lfOutPrecision
;
font32
W
->
lfClipPrecision
=
font32A
->
lfClipPrecision
;
font32
A
->
lfClipPrecision
=
font32W
->
lfClipPrecision
;
font32
W
->
lfQuality
=
font32A
->
lfQuality
;
font32
A
->
lfQuality
=
font32W
->
lfQuality
;
font32
W
->
lfPitchAndFamily
=
font32A
->
lfPitchAndFamily
;
font32
A
->
lfPitchAndFamily
=
font32W
->
lfPitchAndFamily
;
MultiByteToWideChar
(
CP_ACP
,
0
,
font32A
->
lfFaceName
,
-
1
,
font32W
->
lfFaceName
,
LF_FACESIZE
);
WideCharToMultiByte
(
CP_ACP
,
0
,
font32W
->
lfFaceName
,
-
1
,
font32A
->
lfFaceName
,
LF_FACESIZE
,
NULL
,
NULL
);
font32
W
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
font32
A
->
lfFaceName
[
LF_FACESIZE
-
1
]
=
0
;
}
}
static
void
SYSPARAMS_NonClientMetrics32ATo16
(
const
NONCLIENTMETRICSA
*
lpnm32
,
LPNONCLIENTMETRICS16
lpnm16
)
static
void
SYSPARAMS_NonClientMetrics32ATo16
(
const
NONCLIENTMETRICSA
*
lpnm32
,
LPNONCLIENTMETRICS16
lpnm16
)
...
@@ -239,22 +265,22 @@ static void SYSPARAMS_NonClientMetrics32ATo16( const NONCLIENTMETRICSA* lpnm32,
...
@@ -239,22 +265,22 @@ static void SYSPARAMS_NonClientMetrics32ATo16( const NONCLIENTMETRICSA* lpnm32,
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfMessageFont
,
&
lpnm16
->
lfMessageFont
);
SYSPARAMS_LogFont32ATo16
(
&
lpnm32
->
lfMessageFont
,
&
lpnm16
->
lfMessageFont
);
}
}
static
void
SYSPARAMS_NonClientMetrics32
ATo32W
(
const
NONCLIENTMETRICSA
*
lpnm32A
,
LPNONCLIENTMETRICSW
lpnm32W
)
static
void
SYSPARAMS_NonClientMetrics32
WTo32A
(
const
NONCLIENTMETRICSW
*
lpnm32W
,
LPNONCLIENTMETRICSA
lpnm32A
)
{
{
lpnm32
W
->
iBorderWidth
=
lpnm32A
->
iBorderWidth
;
lpnm32
A
->
iBorderWidth
=
lpnm32W
->
iBorderWidth
;
lpnm32
W
->
iScrollWidth
=
lpnm32A
->
iScrollWidth
;
lpnm32
A
->
iScrollWidth
=
lpnm32W
->
iScrollWidth
;
lpnm32
W
->
iScrollHeight
=
lpnm32A
->
iScrollHeight
;
lpnm32
A
->
iScrollHeight
=
lpnm32W
->
iScrollHeight
;
lpnm32
W
->
iCaptionWidth
=
lpnm32A
->
iCaptionWidth
;
lpnm32
A
->
iCaptionWidth
=
lpnm32W
->
iCaptionWidth
;
lpnm32
W
->
iCaptionHeight
=
lpnm32A
->
iCaptionHeight
;
lpnm32
A
->
iCaptionHeight
=
lpnm32W
->
iCaptionHeight
;
SYSPARAMS_LogFont32
ATo32W
(
&
lpnm32A
->
lfCaptionFont
,
&
lpnm32W
->
lfCaptionFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
lpnm32W
->
lfCaptionFont
,
&
lpnm32A
->
lfCaptionFont
);
lpnm32
W
->
iSmCaptionWidth
=
lpnm32A
->
iSmCaptionWidth
;
lpnm32
A
->
iSmCaptionWidth
=
lpnm32W
->
iSmCaptionWidth
;
lpnm32
W
->
iSmCaptionHeight
=
lpnm32A
->
iSmCaptionHeight
;
lpnm32
A
->
iSmCaptionHeight
=
lpnm32W
->
iSmCaptionHeight
;
SYSPARAMS_LogFont32
ATo32W
(
&
lpnm32A
->
lfSmCaptionFont
,
&
lpnm32W
->
lfSmCaptionFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
lpnm32W
->
lfSmCaptionFont
,
&
lpnm32A
->
lfSmCaptionFont
);
lpnm32
W
->
iMenuWidth
=
lpnm32A
->
iMenuWidth
;
lpnm32
A
->
iMenuWidth
=
lpnm32W
->
iMenuWidth
;
lpnm32
W
->
iMenuHeight
=
lpnm32A
->
iMenuHeight
;
lpnm32
A
->
iMenuHeight
=
lpnm32W
->
iMenuHeight
;
SYSPARAMS_LogFont32
ATo32W
(
&
lpnm32A
->
lfMenuFont
,
&
lpnm32W
->
lfMenuFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
lpnm32W
->
lfMenuFont
,
&
lpnm32A
->
lfMenuFont
);
SYSPARAMS_LogFont32
ATo32W
(
&
lpnm32A
->
lfStatusFont
,
&
lpnm32W
->
lfStatusFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
lpnm32W
->
lfStatusFont
,
&
lpnm32A
->
lfStatusFont
);
SYSPARAMS_LogFont32
ATo32W
(
&
lpnm32A
->
lfMessageFont
,
&
lpnm32W
->
lfMessageFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
lpnm32W
->
lfMessageFont
,
&
lpnm32A
->
lfMessageFont
);
}
}
/***********************************************************************
/***********************************************************************
...
@@ -357,7 +383,7 @@ static HKEY get_volatile_regkey(void)
...
@@ -357,7 +383,7 @@ static HKEY get_volatile_regkey(void)
if
(
!
volatile_key
)
if
(
!
volatile_key
)
{
{
if
(
RegCreateKeyEx
A
(
HKEY_CURRENT_USER
,
WINE_CURRENT_USER_REGKEY
,
if
(
RegCreateKeyEx
W
(
HKEY_CURRENT_USER
,
WINE_CURRENT_USER_REGKEY
,
0
,
0
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
0
,
0
,
0
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
0
,
&
volatile_key
,
0
)
!=
ERROR_SUCCESS
)
&
volatile_key
,
0
)
!=
ERROR_SUCCESS
)
ERR
(
"Can't create wine configuration registry branch
\n
"
);
ERR
(
"Can't create wine configuration registry branch
\n
"
);
...
@@ -394,16 +420,16 @@ void SYSPARAMS_NotifyChange( UINT uiAction, UINT fWinIni )
...
@@ -394,16 +420,16 @@ void SYSPARAMS_NotifyChange( UINT uiAction, UINT fWinIni )
/***********************************************************************
/***********************************************************************
* Loads system parameter from user profile.
* Loads system parameter from user profile.
*/
*/
static
BOOL
SYSPARAMS_Load
(
LPC
STR
lpRegKey
,
LPCSTR
lpValName
,
LP
STR
lpBuf
,
DWORD
count
)
static
BOOL
SYSPARAMS_Load
(
LPC
WSTR
lpRegKey
,
LPCWSTR
lpValName
,
LPW
STR
lpBuf
,
DWORD
count
)
{
{
BOOL
ret
=
FALSE
;
BOOL
ret
=
FALSE
;
DWORD
type
;
DWORD
type
;
HKEY
hKey
;
HKEY
hKey
;
if
((
RegOpenKey
A
(
get_volatile_regkey
(),
lpRegKey
,
&
hKey
)
==
ERROR_SUCCESS
)
||
if
((
RegOpenKey
W
(
get_volatile_regkey
(),
lpRegKey
,
&
hKey
)
==
ERROR_SUCCESS
)
||
(
RegOpenKey
A
(
HKEY_CURRENT_USER
,
lpRegKey
,
&
hKey
)
==
ERROR_SUCCESS
))
(
RegOpenKey
W
(
HKEY_CURRENT_USER
,
lpRegKey
,
&
hKey
)
==
ERROR_SUCCESS
))
{
{
ret
=
!
RegQueryValueEx
A
(
hKey
,
lpValName
,
NULL
,
&
type
,
lpBuf
,
&
count
);
ret
=
!
RegQueryValueEx
W
(
hKey
,
lpValName
,
NULL
,
&
type
,
(
LPBYTE
)
lpBuf
,
&
count
);
RegCloseKey
(
hKey
);
RegCloseKey
(
hKey
);
}
}
return
ret
;
return
ret
;
...
@@ -412,7 +438,7 @@ static BOOL SYSPARAMS_Load( LPCSTR lpRegKey, LPCSTR lpValName, LPSTR lpBuf, DWOR
...
@@ -412,7 +438,7 @@ static BOOL SYSPARAMS_Load( LPCSTR lpRegKey, LPCSTR lpValName, LPSTR lpBuf, DWOR
/***********************************************************************
/***********************************************************************
* Saves system parameter to user profile.
* Saves system parameter to user profile.
*/
*/
static
BOOL
SYSPARAMS_Save
(
LPC
STR
lpRegKey
,
LPCSTR
lpValName
,
LPC
STR
lpValue
,
static
BOOL
SYSPARAMS_Save
(
LPC
WSTR
lpRegKey
,
LPCWSTR
lpValName
,
LPCW
STR
lpValue
,
UINT
fWinIni
)
UINT
fWinIni
)
{
{
HKEY
hKey
;
HKEY
hKey
;
...
@@ -431,16 +457,17 @@ static BOOL SYSPARAMS_Save( LPCSTR lpRegKey, LPCSTR lpValName, LPCSTR lpValue,
...
@@ -431,16 +457,17 @@ static BOOL SYSPARAMS_Save( LPCSTR lpRegKey, LPCSTR lpValName, LPCSTR lpValue,
dwOptions
=
REG_OPTION_VOLATILE
;
dwOptions
=
REG_OPTION_VOLATILE
;
}
}
if
(
RegCreateKeyEx
A
(
hBaseKey
,
lpRegKey
,
if
(
RegCreateKeyEx
W
(
hBaseKey
,
lpRegKey
,
0
,
0
,
dwOptions
,
KEY_ALL_ACCESS
,
0
,
0
,
dwOptions
,
KEY_ALL_ACCESS
,
0
,
&
hKey
,
0
)
==
ERROR_SUCCESS
)
0
,
&
hKey
,
0
)
==
ERROR_SUCCESS
)
{
{
if
(
RegSetValueExA
(
hKey
,
lpValName
,
0
,
REG_SZ
,
if
(
RegSetValueExW
(
hKey
,
lpValName
,
0
,
REG_SZ
,
lpValue
,
strlen
(
lpValue
)
+
1
)
==
ERROR_SUCCESS
)
(
const
BYTE
*
)
lpValue
,
(
strlenW
(
lpValue
)
+
1
)
*
sizeof
(
WCHAR
))
==
ERROR_SUCCESS
)
{
{
ret
=
TRUE
;
ret
=
TRUE
;
if
(
hBaseKey
==
HKEY_CURRENT_USER
)
if
(
hBaseKey
==
HKEY_CURRENT_USER
)
RegDeleteKey
A
(
get_volatile_regkey
(),
lpRegKey
);
RegDeleteKey
W
(
get_volatile_regkey
(),
lpRegKey
);
}
}
RegCloseKey
(
hKey
);
RegCloseKey
(
hKey
);
}
}
...
@@ -455,16 +482,14 @@ static BOOL SYSPARAMS_Save( LPCSTR lpRegKey, LPCSTR lpValName, LPCSTR lpValue,
...
@@ -455,16 +482,14 @@ static BOOL SYSPARAMS_Save( LPCSTR lpRegKey, LPCSTR lpValName, LPCSTR lpValue,
*/
*/
void
SYSPARAMS_GetDoubleClickSize
(
INT
*
width
,
INT
*
height
)
void
SYSPARAMS_GetDoubleClickSize
(
INT
*
width
,
INT
*
height
)
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
!
spi_loaded
[
SPI_SETDOUBLECLKWIDTH_IDX
])
if
(
!
spi_loaded
[
SPI_SETDOUBLECLKWIDTH_IDX
])
{
{
char
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETDOUBLECLKWIDTH_REGKEY1
,
if
(
SYSPARAMS_Load
(
SPI_SETDOUBLECLKWIDTH_REGKEY1
,
SPI_SETDOUBLECLKWIDTH_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETDOUBLECLKWIDTH_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
SYSMETRICS_Set
(
SM_CXDOUBLECLK
,
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_CXDOUBLECLK
,
atoi
W
(
buf
)
);
}
}
spi_loaded
[
SPI_SETDOUBLECLKWIDTH_IDX
]
=
TRUE
;
spi_loaded
[
SPI_SETDOUBLECLKWIDTH_IDX
]
=
TRUE
;
}
}
...
@@ -473,7 +498,7 @@ void SYSPARAMS_GetDoubleClickSize( INT *width, INT *height )
...
@@ -473,7 +498,7 @@ void SYSPARAMS_GetDoubleClickSize( INT *width, INT *height )
if
(
SYSPARAMS_Load
(
SPI_SETDOUBLECLKHEIGHT_REGKEY1
,
if
(
SYSPARAMS_Load
(
SPI_SETDOUBLECLKHEIGHT_REGKEY1
,
SPI_SETDOUBLECLKHEIGHT_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETDOUBLECLKHEIGHT_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
SYSMETRICS_Set
(
SM_CYDOUBLECLK
,
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_CYDOUBLECLK
,
atoi
W
(
buf
)
);
}
}
spi_loaded
[
SPI_SETDOUBLECLKHEIGHT_IDX
]
=
TRUE
;
spi_loaded
[
SPI_SETDOUBLECLKHEIGHT_IDX
]
=
TRUE
;
}
}
...
@@ -493,12 +518,12 @@ INT SYSPARAMS_GetMouseButtonSwap( void )
...
@@ -493,12 +518,12 @@ INT SYSPARAMS_GetMouseButtonSwap( void )
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETMOUSEBUTTONSWAP_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETMOUSEBUTTONSWAP_REGKEY
,
SPI_SETMOUSEBUTTONSWAP_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETMOUSEBUTTONSWAP_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
SYSMETRICS_Set
(
SM_SWAPBUTTON
,
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_SWAPBUTTON
,
atoi
W
(
buf
)
);
}
}
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -513,19 +538,19 @@ INT SYSPARAMS_GetMouseButtonSwap( void )
...
@@ -513,19 +538,19 @@ INT SYSPARAMS_GetMouseButtonSwap( void )
* fills LOGFONT with 'default GUI font'.
* fills LOGFONT with 'default GUI font'.
*/
*/
static
void
SYSPARAMS_GetGUIFont
(
LOGFONT
A
*
plf
)
static
void
SYSPARAMS_GetGUIFont
(
LOGFONT
W
*
plf
)
{
{
HFONT
hf
;
HFONT
hf
;
memset
(
plf
,
0
,
sizeof
(
LOGFONT
A
)
);
memset
(
plf
,
0
,
sizeof
(
LOGFONT
W
)
);
hf
=
(
HFONT
)
GetStockObject
(
DEFAULT_GUI_FONT
);
hf
=
(
HFONT
)
GetStockObject
(
DEFAULT_GUI_FONT
);
if
(
GetObject
A
(
hf
,
sizeof
(
LOGFONTA
),
plf
)
!=
sizeof
(
LOGFONTA
)
)
if
(
GetObject
W
(
hf
,
sizeof
(
LOGFONTW
),
plf
)
!=
sizeof
(
LOGFONTW
)
)
{
{
/*
/*
* GetObject
A
() would be succeeded always
* GetObject
W
() would be succeeded always
* since this is a stock object
* since this is a stock object
*/
*/
ERR
(
"GetObject
A
() failed
\n
"
);
ERR
(
"GetObject
W
() failed
\n
"
);
}
}
}
}
...
@@ -538,7 +563,7 @@ inline static int SYSPARAMS_Twips2Pixels(int x)
...
@@ -538,7 +563,7 @@ inline static int SYSPARAMS_Twips2Pixels(int x)
}
}
/***********************************************************************
/***********************************************************************
* SystemParametersInfo
A
(USER32.@)
* SystemParametersInfo
W
(USER32.@)
*
*
* Each system parameter has flag which shows whether the parameter
* Each system parameter has flag which shows whether the parameter
* is loaded or not. Parameters, stored directly in SysParametersInfo are
* is loaded or not. Parameters, stored directly in SysParametersInfo are
...
@@ -561,7 +586,7 @@ inline static int SYSPARAMS_Twips2Pixels(int x)
...
@@ -561,7 +586,7 @@ inline static int SYSPARAMS_Twips2Pixels(int x)
* Some SPI values can also be stored as Twips values in the registry,
* Some SPI values can also be stored as Twips values in the registry,
* don't forget the conversion!
* don't forget the conversion!
*/
*/
BOOL
WINAPI
SystemParametersInfo
A
(
UINT
uiAction
,
UINT
uiParam
,
BOOL
WINAPI
SystemParametersInfo
W
(
UINT
uiAction
,
UINT
uiParam
,
PVOID
pvParam
,
UINT
fWinIni
)
PVOID
pvParam
,
UINT
fWinIni
)
{
{
#define WINE_SPI_FIXME(x) \
#define WINE_SPI_FIXME(x) \
...
@@ -588,10 +613,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -588,10 +613,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETBEEP_IDX
;
spi_idx
=
SPI_SETBEEP_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
buf
,
sizeof
(
buf
)
))
if
(
SYSPARAMS_Load
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
buf
,
sizeof
(
buf
)
))
beep_active
=
!
strcasecmp
(
"Yes"
,
buf
);
beep_active
=
!
lstrcmpiW
(
Yes
,
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -601,7 +626,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -601,7 +626,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETBEEP
:
/* 2 */
case
SPI_SETBEEP
:
/* 2 */
spi_idx
=
SPI_SETBEEP_IDX
;
spi_idx
=
SPI_SETBEEP_IDX
;
if
(
SYSPARAMS_Save
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
if
(
SYSPARAMS_Save
(
SPI_SETBEEP_REGKEY
,
SPI_SETBEEP_VALNAME
,
(
uiParam
?
"Yes"
:
"No"
),
fWinIni
))
(
uiParam
?
Yes
:
No
),
fWinIni
))
{
{
beep_active
=
uiParam
;
beep_active
=
uiParam
;
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
...
@@ -616,17 +641,17 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -616,17 +641,17 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETMOUSE_IDX
;
spi_idx
=
SPI_SETMOUSE_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME1
,
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME1
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
mouse_threshold1
=
atoi
(
buf
);
mouse_threshold1
=
atoi
W
(
buf
);
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME2
,
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME2
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
mouse_threshold2
=
atoi
(
buf
);
mouse_threshold2
=
atoi
W
(
buf
);
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME3
,
if
(
SYSPARAMS_Load
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME3
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
mouse_speed
=
atoi
(
buf
);
mouse_speed
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
((
INT
*
)
pvParam
)[
0
]
=
mouse_threshold1
;
((
INT
*
)
pvParam
)[
0
]
=
mouse_threshold1
;
...
@@ -636,12 +661,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -636,12 +661,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETMOUSE
:
/* 4 */
case
SPI_SETMOUSE
:
/* 4 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
spi_idx
=
SPI_SETMOUSE_IDX
;
spi_idx
=
SPI_SETMOUSE_IDX
;
sprintf
(
buf
,
"%d"
,
((
INT
*
)
pvParam
)[
0
]);
wsprintfW
(
buf
,
CSd
,
((
INT
*
)
pvParam
)[
0
]);
if
(
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME1
,
if
(
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME1
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -649,12 +674,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -649,12 +674,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
mouse_threshold1
=
((
INT
*
)
pvParam
)[
0
];
mouse_threshold1
=
((
INT
*
)
pvParam
)[
0
];
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
sprintf
(
buf
,
"%d"
,
((
INT
*
)
pvParam
)[
1
]);
wsprintfW
(
buf
,
CSd
,
((
INT
*
)
pvParam
)[
1
]);
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME2
,
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME2
,
buf
,
fWinIni
);
buf
,
fWinIni
);
mouse_threshold2
=
((
INT
*
)
pvParam
)[
1
];
mouse_threshold2
=
((
INT
*
)
pvParam
)[
1
];
sprintf
(
buf
,
"%d"
,
((
INT
*
)
pvParam
)[
2
]);
wsprintfW
(
buf
,
CSd
,
((
INT
*
)
pvParam
)[
2
]);
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME3
,
SYSPARAMS_Save
(
SPI_SETMOUSE_REGKEY
,
SPI_SETMOUSE_VALNAME3
,
buf
,
fWinIni
);
buf
,
fWinIni
);
mouse_speed
=
((
INT
*
)
pvParam
)[
2
];
mouse_speed
=
((
INT
*
)
pvParam
)[
2
];
...
@@ -670,10 +695,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -670,10 +695,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETBORDER_IDX
;
spi_idx
=
SPI_SETBORDER_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
buf
,
sizeof
(
buf
)
))
if
(
SYSPARAMS_Load
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
buf
,
sizeof
(
buf
)
))
border
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
border
=
SYSPARAMS_Twips2Pixels
(
atoi
W
(
buf
)
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
if
(
TWEAK_WineLook
>
WIN31_LOOK
)
if
(
TWEAK_WineLook
>
WIN31_LOOK
)
...
@@ -687,10 +712,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -687,10 +712,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETBORDER
:
/* 6 */
case
SPI_SETBORDER
:
/* 6 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETBORDER_IDX
;
spi_idx
=
SPI_SETBORDER_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
if
(
SYSPARAMS_Save
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -717,12 +742,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -717,12 +742,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETKEYBOARDSPEED_IDX
;
spi_idx
=
SPI_SETKEYBOARDSPEED_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDSPEED_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDSPEED_REGKEY
,
SPI_SETKEYBOARDSPEED_VALNAME
,
SPI_SETKEYBOARDSPEED_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
keyboard_speed
=
atoi
(
buf
);
keyboard_speed
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
*
(
INT
*
)
pvParam
=
keyboard_speed
;
*
(
INT
*
)
pvParam
=
keyboard_speed
;
...
@@ -730,12 +755,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -730,12 +755,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETKEYBOARDSPEED
:
/* 11 */
case
SPI_SETKEYBOARDSPEED
:
/* 11 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETKEYBOARDSPEED_IDX
;
spi_idx
=
SPI_SETKEYBOARDSPEED_IDX
;
if
(
uiParam
>
31
)
if
(
uiParam
>
31
)
uiParam
=
31
;
uiParam
=
31
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDSPEED_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDSPEED_REGKEY
,
SPI_SETKEYBOARDSPEED_VALNAME
,
SPI_SETKEYBOARDSPEED_VALNAME
,
...
@@ -758,13 +783,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -758,13 +783,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
{
{
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
int
val
;
int
val
;
if
(
SYSPARAMS_Load
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
val
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
val
=
SYSPARAMS_Twips2Pixels
(
atoi
W
(
buf
)
);
SYSMETRICS_Set
(
SM_CXICONSPACING
,
val
);
SYSMETRICS_Set
(
SM_CXICONSPACING
,
val
);
}
}
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
...
@@ -774,11 +799,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -774,11 +799,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
}
}
else
else
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
uiParam
<
32
)
uiParam
=
32
;
if
(
uiParam
<
32
)
uiParam
=
32
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -797,12 +822,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -797,12 +822,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETSCREENSAVETIMEOUT_IDX
;
spi_idx
=
SPI_SETSCREENSAVETIMEOUT_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETSCREENSAVETIMEOUT_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETSCREENSAVETIMEOUT_REGKEY
,
SPI_SETSCREENSAVETIMEOUT_VALNAME
,
SPI_SETSCREENSAVETIMEOUT_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
screensave_timeout
=
atoi
(
buf
);
screensave_timeout
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -811,10 +836,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -811,10 +836,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETSCREENSAVETIMEOUT
:
/* 15 */
case
SPI_SETSCREENSAVETIMEOUT
:
/* 15 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETSCREENSAVETIMEOUT_IDX
;
spi_idx
=
SPI_SETSCREENSAVETIMEOUT_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETSCREENSAVETIMEOUT_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETSCREENSAVETIMEOUT_REGKEY
,
SPI_SETSCREENSAVETIMEOUT_VALNAME
,
SPI_SETSCREENSAVETIMEOUT_VALNAME
,
...
@@ -835,9 +860,9 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -835,9 +860,9 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETSCREENSAVEACTIVE
:
/* 17 */
case
SPI_SETSCREENSAVEACTIVE
:
/* 17 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
USER_Driver
.
pSetScreenSaveActive
(
uiParam
);
USER_Driver
.
pSetScreenSaveActive
(
uiParam
);
/* saved value does not affect Wine */
/* saved value does not affect Wine */
SYSPARAMS_Save
(
SPI_SETSCREENSAVEACTIVE_REGKEY
,
SYSPARAMS_Save
(
SPI_SETSCREENSAVEACTIVE_REGKEY
,
...
@@ -852,12 +877,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -852,12 +877,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETGRIDGRANULARITY_IDX
;
spi_idx
=
SPI_SETGRIDGRANULARITY_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETGRIDGRANULARITY_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETGRIDGRANULARITY_REGKEY
,
SPI_SETGRIDGRANULARITY_VALNAME
,
SPI_SETGRIDGRANULARITY_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
grid_granularity
=
atoi
(
buf
);
grid_granularity
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -866,10 +891,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -866,10 +891,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETGRIDGRANULARITY
:
/* 19 */
case
SPI_SETGRIDGRANULARITY
:
/* 19 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETGRIDGRANULARITY_IDX
;
spi_idx
=
SPI_SETGRIDGRANULARITY_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETGRIDGRANULARITY_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETGRIDGRANULARITY_REGKEY
,
SPI_SETGRIDGRANULARITY_VALNAME
,
SPI_SETGRIDGRANULARITY_VALNAME
,
...
@@ -887,18 +912,19 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -887,18 +912,19 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
pvParam
||
!
SetDeskWallPaper
(
(
LPSTR
)
pvParam
))
return
FALSE
;
if
(
!
pvParam
||
!
SetDeskWallPaper
(
(
LPSTR
)
pvParam
))
return
FALSE
;
SYSPARAMS_Save
(
SPI_SETDESKWALLPAPER_REGKEY
,
SPI_SETDESKWALLPAPER_VALNAME
,
pvParam
,
fWinIni
);
SYSPARAMS_Save
(
SPI_SETDESKWALLPAPER_REGKEY
,
SPI_SETDESKWALLPAPER_VALNAME
,
pvParam
,
fWinIni
);
break
;
break
;
case
SPI_SETDESKPATTERN
:
/* 21 */
case
SPI_SETDESKPATTERN
:
/* 21 */
/* FIXME: the ability to specify a pattern in pvParam
/* FIXME: the ability to specify a pattern in pvParam
doesn't seem to be documented for Win32 */
doesn't seem to be documented for Win32 */
if
((
INT16
)
uiParam
==
-
1
)
if
((
INT16
)
uiParam
==
-
1
)
{
{
char
buffer
[
256
];
WCHAR
buf
[
256
];
GetProfileStringA
(
"Desktop"
,
"Pattern"
,
GetProfileStringW
(
Desktop
,
Pattern
,
"170 85 170 85 170 85 170 85"
,
defPattern
,
buffer
,
sizeof
(
buffer
)
);
buf
,
sizeof
(
buf
)
/
sizeof
(
WCHAR
)
);
ret
=
DESKTOP_SetPattern
(
(
LPSTR
)
buffer
);
ret
=
DESKTOP_SetPattern
(
buf
);
}
else
}
else
ret
=
DESKTOP_SetPattern
(
(
LP
STR
)
pvParam
);
ret
=
DESKTOP_SetPattern
(
(
LPW
STR
)
pvParam
);
break
;
break
;
case
SPI_GETKEYBOARDDELAY
:
/* 22 */
case
SPI_GETKEYBOARDDELAY
:
/* 22 */
...
@@ -907,13 +933,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -907,13 +933,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETKEYBOARDDELAY_IDX
;
spi_idx
=
SPI_SETKEYBOARDDELAY_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDDELAY_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDDELAY_REGKEY
,
SPI_SETKEYBOARDDELAY_VALNAME
,
SPI_SETKEYBOARDDELAY_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
{
{
int
i
=
atoi
(
buf
);
int
i
=
atoi
W
(
buf
);
if
(
(
i
>=
0
)
&&
(
i
<=
3
))
keyboard_delay
=
i
;
if
(
(
i
>=
0
)
&&
(
i
<=
3
))
keyboard_delay
=
i
;
}
}
...
@@ -924,10 +950,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -924,10 +950,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETKEYBOARDDELAY
:
/* 23 */
case
SPI_SETKEYBOARDDELAY
:
/* 23 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETKEYBOARDDELAY_IDX
;
spi_idx
=
SPI_SETKEYBOARDDELAY_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDDELAY_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDDELAY_REGKEY
,
SPI_SETKEYBOARDDELAY_VALNAME
,
SPI_SETKEYBOARDDELAY_VALNAME
,
...
@@ -948,13 +974,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -948,13 +974,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
{
{
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
int
val
;
int
val
;
if
(
SYSPARAMS_Load
(
SPI_ICONVERTICALSPACING_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_ICONVERTICALSPACING_REGKEY
,
SPI_ICONVERTICALSPACING_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_ICONVERTICALSPACING_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
val
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
val
=
SYSPARAMS_Twips2Pixels
(
atoi
W
(
buf
)
);
SYSMETRICS_Set
(
SM_CYICONSPACING
,
val
);
SYSMETRICS_Set
(
SM_CYICONSPACING
,
val
);
}
}
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
...
@@ -964,11 +990,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -964,11 +990,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
}
}
else
else
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
uiParam
<
32
)
uiParam
=
32
;
if
(
uiParam
<
32
)
uiParam
=
32
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_ICONVERTICALSPACING_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_ICONVERTICALSPACING_REGKEY
,
SPI_ICONVERTICALSPACING_VALNAME
,
SPI_ICONVERTICALSPACING_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -988,11 +1014,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -988,11 +1014,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETICONTITLEWRAP_IDX
;
spi_idx
=
SPI_SETICONTITLEWRAP_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETICONTITLEWRAP_REGKEY1
,
if
(
SYSPARAMS_Load
(
SPI_SETICONTITLEWRAP_REGKEY1
,
SPI_SETICONTITLEWRAP_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETICONTITLEWRAP_VALNAME
,
buf
,
sizeof
(
buf
)
))
icon_title_wrap
=
atoi
(
buf
);
icon_title_wrap
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1001,10 +1027,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1001,10 +1027,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETICONTITLEWRAP
:
/* 26 */
case
SPI_SETICONTITLEWRAP
:
/* 26 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETICONTITLEWRAP_IDX
;
spi_idx
=
SPI_SETICONTITLEWRAP_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETICONTITLEWRAP_REGKEY1
,
if
(
SYSPARAMS_Save
(
SPI_SETICONTITLEWRAP_REGKEY1
,
SPI_SETICONTITLEWRAP_VALNAME
,
SPI_SETICONTITLEWRAP_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1027,12 +1053,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1027,12 +1053,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETMENUDROPALIGNMENT_REGKEY1
,
if
(
SYSPARAMS_Load
(
SPI_SETMENUDROPALIGNMENT_REGKEY1
,
SPI_SETMENUDROPALIGNMENT_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETMENUDROPALIGNMENT_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
SYSMETRICS_Set
(
SM_MENUDROPALIGNMENT
,
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_MENUDROPALIGNMENT
,
atoi
W
(
buf
)
);
}
}
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1042,10 +1068,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1042,10 +1068,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETMENUDROPALIGNMENT
:
/* 28 */
case
SPI_SETMENUDROPALIGNMENT
:
/* 28 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETMENUDROPALIGNMENT_IDX
;
spi_idx
=
SPI_SETMENUDROPALIGNMENT_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETMENUDROPALIGNMENT_REGKEY1
,
if
(
SYSPARAMS_Save
(
SPI_SETMENUDROPALIGNMENT_REGKEY1
,
SPI_SETMENUDROPALIGNMENT_VALNAME
,
SPI_SETMENUDROPALIGNMENT_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1063,10 +1089,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1063,10 +1089,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETDOUBLECLKWIDTH
:
/* 29 */
case
SPI_SETDOUBLECLKWIDTH
:
/* 29 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETDOUBLECLKWIDTH_IDX
;
spi_idx
=
SPI_SETDOUBLECLKWIDTH_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLKWIDTH_REGKEY1
,
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLKWIDTH_REGKEY1
,
SPI_SETDOUBLECLKWIDTH_VALNAME
,
SPI_SETDOUBLECLKWIDTH_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1084,10 +1110,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1084,10 +1110,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETDOUBLECLKHEIGHT
:
/* 30 */
case
SPI_SETDOUBLECLKHEIGHT
:
/* 30 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETDOUBLECLKHEIGHT_IDX
;
spi_idx
=
SPI_SETDOUBLECLKHEIGHT_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLKHEIGHT_REGKEY1
,
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLKHEIGHT_REGKEY1
,
SPI_SETDOUBLECLKHEIGHT_VALNAME
,
SPI_SETDOUBLECLKHEIGHT_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1105,8 +1131,8 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1105,8 +1131,8 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETICONTITLELOGFONT
:
/* 31 */
case
SPI_GETICONTITLELOGFONT
:
/* 31 */
{
{
LPLOGFONT
A
lpLogFont
=
(
LPLOGFONTA
)
pvParam
;
LPLOGFONT
W
lpLogFont
=
(
LPLOGFONTW
)
pvParam
;
LOGFONT
A
lfDefault
;
LOGFONT
W
lfDefault
;
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
...
@@ -1117,10 +1143,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1117,10 +1143,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
*/
*/
SYSPARAMS_GetGUIFont
(
&
lfDefault
);
SYSPARAMS_GetGUIFont
(
&
lfDefault
);
GetProfileString
A
(
"Desktop"
,
"IconTitleFaceName"
,
GetProfileString
W
(
Desktop
,
IconTitleFaceName
,
lfDefault
.
lfFaceName
,
lfDefault
.
lfFaceName
,
lpLogFont
->
lfFaceName
,
LF_FACESIZE
);
lpLogFont
->
lfFaceName
,
LF_FACESIZE
);
lpLogFont
->
lfHeight
=
-
GetProfileInt
A
(
"Desktop"
,
"IconTitleSize"
,
11
);
lpLogFont
->
lfHeight
=
-
GetProfileInt
W
(
Desktop
,
IconTitleSize
,
11
);
lpLogFont
->
lfWidth
=
0
;
lpLogFont
->
lfWidth
=
0
;
lpLogFont
->
lfEscapement
=
lpLogFont
->
lfOrientation
=
0
;
lpLogFont
->
lfEscapement
=
lpLogFont
->
lfOrientation
=
0
;
lpLogFont
->
lfWeight
=
FW_NORMAL
;
lpLogFont
->
lfWeight
=
FW_NORMAL
;
...
@@ -1137,10 +1163,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1137,10 +1163,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETDOUBLECLICKTIME
:
/* 32 */
case
SPI_SETDOUBLECLICKTIME
:
/* 32 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETDOUBLECLICKTIME_IDX
;
spi_idx
=
SPI_SETDOUBLECLICKTIME_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLICKTIME_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETDOUBLECLICKTIME_REGKEY
,
SPI_SETDOUBLECLICKTIME_VALNAME
,
SPI_SETDOUBLECLICKTIME_VALNAME
,
...
@@ -1158,10 +1184,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1158,10 +1184,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETMOUSEBUTTONSWAP
:
/* 33 */
case
SPI_SETMOUSEBUTTONSWAP
:
/* 33 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETMOUSEBUTTONSWAP_IDX
;
spi_idx
=
SPI_SETMOUSEBUTTONSWAP_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETMOUSEBUTTONSWAP_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETMOUSEBUTTONSWAP_REGKEY
,
SPI_SETMOUSEBUTTONSWAP_VALNAME
,
SPI_SETMOUSEBUTTONSWAP_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1188,10 +1214,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1188,10 +1214,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETDRAGFULLWINDOWS
:
/* 37 WINVER >= 0x0400 */
case
SPI_SETDRAGFULLWINDOWS
:
/* 37 WINVER >= 0x0400 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETDRAGFULLWINDOWS_IDX
;
spi_idx
=
SPI_SETDRAGFULLWINDOWS_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETDRAGFULLWINDOWS_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETDRAGFULLWINDOWS_REGKEY
,
SPI_SETDRAGFULLWINDOWS_VALNAME
,
SPI_SETDRAGFULLWINDOWS_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1210,11 +1236,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1210,11 +1236,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETDRAGFULLWINDOWS_IDX
;
spi_idx
=
SPI_SETDRAGFULLWINDOWS_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETDRAGFULLWINDOWS_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETDRAGFULLWINDOWS_REGKEY
,
SPI_SETDRAGFULLWINDOWS_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETDRAGFULLWINDOWS_VALNAME
,
buf
,
sizeof
(
buf
)
))
drag_full_windows
=
atoi
(
buf
);
drag_full_windows
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1223,11 +1249,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1223,11 +1249,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETNONCLIENTMETRICS
:
/* 41 WINVER >= 0x400 */
case
SPI_GETNONCLIENTMETRICS
:
/* 41 WINVER >= 0x400 */
{
{
LPNONCLIENTMETRICS
A
lpnm
=
(
LPNONCLIENTMETRICSA
)
pvParam
;
LPNONCLIENTMETRICS
W
lpnm
=
(
LPNONCLIENTMETRICSW
)
pvParam
;
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
if
(
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICS
A
))
if
(
lpnm
->
cbSize
==
sizeof
(
NONCLIENTMETRICS
W
))
{
{
/* clear the struct, so we have 'sane' members */
/* clear the struct, so we have 'sane' members */
memset
(
memset
(
...
@@ -1246,7 +1272,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1246,7 +1272,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
lpnm
->
iCaptionHeight
=
GetSystemMetrics
(
SM_CYSIZE
);
lpnm
->
iCaptionHeight
=
GetSystemMetrics
(
SM_CYSIZE
);
/* caption font metrics */
/* caption font metrics */
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfCaptionFont
),
0
);
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfCaptionFont
),
0
);
lpnm
->
lfCaptionFont
.
lfWeight
=
FW_BOLD
;
lpnm
->
lfCaptionFont
.
lfWeight
=
FW_BOLD
;
/* size of the small caption buttons */
/* size of the small caption buttons */
...
@@ -1254,7 +1280,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1254,7 +1280,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
lpnm
->
iSmCaptionHeight
=
GetSystemMetrics
(
SM_CYSMSIZE
);
lpnm
->
iSmCaptionHeight
=
GetSystemMetrics
(
SM_CYSMSIZE
);
/* small caption font metrics */
/* small caption font metrics */
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfSmCaptionFont
),
0
);
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfSmCaptionFont
),
0
);
/* menus, FIXME: names of wine.conf entries are bogus */
/* menus, FIXME: names of wine.conf entries are bogus */
...
@@ -1263,23 +1289,23 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1263,23 +1289,23 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
lpnm
->
iMenuHeight
=
GetSystemMetrics
(
SM_CYMENUSIZE
);
lpnm
->
iMenuHeight
=
GetSystemMetrics
(
SM_CYMENUSIZE
);
/* menu font metrics */
/* menu font metrics */
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfMenuFont
),
0
);
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfMenuFont
),
0
);
GetProfileString
A
(
"Desktop"
,
"MenuFont"
,
GetProfileString
W
(
Desktop
,
MenuFont
,
(
TWEAK_WineLook
>
WIN31_LOOK
)
?
lpnm
->
lfCaptionFont
.
lfFaceName
:
"System"
,
(
TWEAK_WineLook
>
WIN31_LOOK
)
?
lpnm
->
lfCaptionFont
.
lfFaceName
:
System
,
lpnm
->
lfMenuFont
.
lfFaceName
,
LF_FACESIZE
);
lpnm
->
lfMenuFont
.
lfFaceName
,
LF_FACESIZE
);
lpnm
->
lfMenuFont
.
lfHeight
=
-
GetProfileInt
A
(
"Desktop"
,
"MenuFontSize"
,
11
);
lpnm
->
lfMenuFont
.
lfHeight
=
-
GetProfileInt
W
(
Desktop
,
MenuFontSize
,
11
);
lpnm
->
lfMenuFont
.
lfWeight
=
(
TWEAK_WineLook
>
WIN31_LOOK
)
?
FW_NORMAL
:
FW_BOLD
;
lpnm
->
lfMenuFont
.
lfWeight
=
(
TWEAK_WineLook
>
WIN31_LOOK
)
?
FW_NORMAL
:
FW_BOLD
;
/* status bar font metrics */
/* status bar font metrics */
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfStatusFont
),
0
);
(
LPVOID
)
&
(
lpnm
->
lfStatusFont
),
0
);
/* message font metrics */
/* message font metrics */
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
(
LPVOID
)
&
(
lpnm
->
lfMessageFont
),
0
);
(
LPVOID
)
&
(
lpnm
->
lfMessageFont
),
0
);
}
}
else
else
{
{
WARN
(
"size mismatch !! (is %d; should be %d)
\n
"
,
lpnm
->
cbSize
,
sizeof
(
NONCLIENTMETRICS
A
));
WARN
(
"size mismatch !! (is %d; should be %d)
\n
"
,
lpnm
->
cbSize
,
sizeof
(
NONCLIENTMETRICS
W
));
/* FIXME: SetLastError? */
/* FIXME: SetLastError? */
ret
=
FALSE
;
ret
=
FALSE
;
}
}
...
@@ -1306,16 +1332,16 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1306,16 +1332,16 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETICONMETRICS
:
/* 45 WINVER >= 0x400 */
case
SPI_GETICONMETRICS
:
/* 45 WINVER >= 0x400 */
{
{
LPICONMETRICS
A
lpIcon
=
pvParam
;
LPICONMETRICS
W
lpIcon
=
pvParam
;
if
(
lpIcon
&&
lpIcon
->
cbSize
==
sizeof
(
*
lpIcon
))
if
(
lpIcon
&&
lpIcon
->
cbSize
==
sizeof
(
*
lpIcon
))
{
{
SystemParametersInfo
A
(
SPI_ICONHORIZONTALSPACING
,
0
,
SystemParametersInfo
W
(
SPI_ICONHORIZONTALSPACING
,
0
,
&
lpIcon
->
iHorzSpacing
,
FALSE
);
&
lpIcon
->
iHorzSpacing
,
FALSE
);
SystemParametersInfo
A
(
SPI_ICONVERTICALSPACING
,
0
,
SystemParametersInfo
W
(
SPI_ICONVERTICALSPACING
,
0
,
&
lpIcon
->
iVertSpacing
,
FALSE
);
&
lpIcon
->
iVertSpacing
,
FALSE
);
SystemParametersInfo
A
(
SPI_GETICONTITLEWRAP
,
0
,
SystemParametersInfo
W
(
SPI_GETICONTITLEWRAP
,
0
,
&
lpIcon
->
iTitleWrap
,
FALSE
);
&
lpIcon
->
iTitleWrap
,
FALSE
);
SystemParametersInfo
A
(
SPI_GETICONTITLELOGFONT
,
0
,
SystemParametersInfo
W
(
SPI_GETICONTITLELOGFONT
,
0
,
&
lpIcon
->
lfFont
,
FALSE
);
&
lpIcon
->
lfFont
,
FALSE
);
}
}
else
else
...
@@ -1328,14 +1354,14 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1328,14 +1354,14 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETWORKAREA
:
/* 47 WINVER >= 0x400 */
case
SPI_SETWORKAREA
:
/* 47 WINVER >= 0x400 */
{
{
char
buf
[
20
];
static
const
WCHAR
CSld
[]
=
{
'%'
,
'l'
,
'd'
,
' '
,
'%'
,
'l'
,
'd'
,
' '
,
'%'
,
'l'
,
'd'
,
' '
,
'%'
,
'l'
,
'd'
,
0
};
WCHAR
buf
[
20
];
RECT
*
pr
=
(
RECT
*
)
pvParam
;
RECT
*
pr
=
(
RECT
*
)
pvParam
;
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
spi_idx
=
SPI_SETWORKAREA_IDX
;
spi_idx
=
SPI_SETWORKAREA_IDX
;
sprintf
(
buf
,
"%ld %ld %ld %ld"
,
wsprintfW
(
buf
,
CSld
,
pr
->
left
,
pr
->
top
,
pr
->
left
,
pr
->
top
,
pr
->
right
,
pr
->
bottom
);
pr
->
right
,
pr
->
bottom
);
if
(
SYSPARAMS_Save
(
SPI_SETWORKAREA_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETWORKAREA_REGKEY
,
...
@@ -1356,7 +1382,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1356,7 +1382,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETWORKAREA_IDX
;
spi_idx
=
SPI_SETWORKAREA_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
20
];
WCHAR
buf
[
20
];
SetRect
(
&
work_area
,
0
,
0
,
SetRect
(
&
work_area
,
0
,
0
,
GetSystemMetrics
(
SM_CXSCREEN
),
GetSystemMetrics
(
SM_CXSCREEN
),
...
@@ -1366,7 +1392,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1366,7 +1392,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
SPI_SETWORKAREA_VALNAME
,
SPI_SETWORKAREA_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
{
{
sscanf
(
buf
,
"%ld %ld %ld %ld"
,
char
tmpbuf
[
20
];
WideCharToMultiByte
(
CP_ACP
,
0
,
buf
,
-
1
,
tmpbuf
,
sizeof
(
tmpbuf
),
NULL
,
NULL
);
sscanf
(
tmpbuf
,
"%ld %ld %ld %ld"
,
&
work_area
.
left
,
&
work_area
.
top
,
&
work_area
.
left
,
&
work_area
.
top
,
&
work_area
.
right
,
&
work_area
.
bottom
);
&
work_area
.
right
,
&
work_area
.
bottom
);
}
}
...
@@ -1445,12 +1474,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1445,12 +1474,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETSHOWSOUNDS_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETSHOWSOUNDS_REGKEY
,
SPI_SETSHOWSOUNDS_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETSHOWSOUNDS_VALNAME
,
buf
,
sizeof
(
buf
)
))
{
{
SYSMETRICS_Set
(
SM_SHOWSOUNDS
,
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_SHOWSOUNDS
,
atoi
W
(
buf
)
);
}
}
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1460,10 +1489,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1460,10 +1489,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETSHOWSOUNDS
:
/* 57 */
case
SPI_SETSHOWSOUNDS
:
/* 57 */
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
spi_idx
=
SPI_SETSHOWSOUNDS_IDX
;
spi_idx
=
SPI_SETSHOWSOUNDS_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETSHOWSOUNDS_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETSHOWSOUNDS_REGKEY
,
SPI_SETSHOWSOUNDS_VALNAME
,
SPI_SETSHOWSOUNDS_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1513,16 +1542,16 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1513,16 +1542,16 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETSERIALKEYS
:
/* 62 WINVER >= 0x400 */
case
SPI_GETSERIALKEYS
:
/* 62 WINVER >= 0x400 */
{
{
LPSERIALKEYS
A
lpSerialKeysA
=
(
LPSERIALKEYSA
)
pvParam
;
LPSERIALKEYS
W
lpSerialKeysW
=
(
LPSERIALKEYSW
)
pvParam
;
WARN
(
"SPI_GETSERIALKEYS not fully implemented
\n
"
);
WARN
(
"SPI_GETSERIALKEYS not fully implemented
\n
"
);
if
(
lpSerialKeys
A
&&
lpSerialKeysA
->
cbSize
==
sizeof
(
SERIALKEYSA
))
if
(
lpSerialKeys
W
&&
lpSerialKeysW
->
cbSize
==
sizeof
(
SERIALKEYSW
))
{
{
/* Indicate that no SerialKeys feature available */
/* Indicate that no SerialKeys feature available */
lpSerialKeys
A
->
dwFlags
=
0
;
lpSerialKeys
W
->
dwFlags
=
0
;
lpSerialKeys
A
->
lpszActivePort
=
NULL
;
lpSerialKeys
W
->
lpszActivePort
=
NULL
;
lpSerialKeys
A
->
lpszPort
=
NULL
;
lpSerialKeys
W
->
lpszPort
=
NULL
;
lpSerialKeys
A
->
iBaudRate
=
0
;
lpSerialKeys
W
->
iBaudRate
=
0
;
lpSerialKeys
A
->
iPortState
=
0
;
lpSerialKeys
W
->
iPortState
=
0
;
}
}
else
else
{
{
...
@@ -1534,22 +1563,22 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1534,22 +1563,22 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETSOUNDSENTRY
:
/* 64 */
case
SPI_GETSOUNDSENTRY
:
/* 64 */
{
{
LPSOUNDSENTRY
A
lpSoundSentryA
=
(
LPSOUNDSENTRYA
)
pvParam
;
LPSOUNDSENTRY
W
lpSoundSentryW
=
(
LPSOUNDSENTRYW
)
pvParam
;
WARN
(
"SPI_GETSOUNDSENTRY not fully implemented
\n
"
);
WARN
(
"SPI_GETSOUNDSENTRY not fully implemented
\n
"
);
if
(
lpSoundSentry
A
&&
lpSoundSentryA
->
cbSize
==
sizeof
(
SOUNDSENTRYA
))
if
(
lpSoundSentry
W
&&
lpSoundSentryW
->
cbSize
==
sizeof
(
SOUNDSENTRYW
))
{
{
/* Indicate that no SoundSentry feature available */
/* Indicate that no SoundSentry feature available */
lpSoundSentry
A
->
dwFlags
=
0
;
lpSoundSentry
W
->
dwFlags
=
0
;
lpSoundSentry
A
->
iFSTextEffect
=
0
;
lpSoundSentry
W
->
iFSTextEffect
=
0
;
lpSoundSentry
A
->
iFSTextEffectMSec
=
0
;
lpSoundSentry
W
->
iFSTextEffectMSec
=
0
;
lpSoundSentry
A
->
iFSTextEffectColorBits
=
0
;
lpSoundSentry
W
->
iFSTextEffectColorBits
=
0
;
lpSoundSentry
A
->
iFSGrafEffect
=
0
;
lpSoundSentry
W
->
iFSGrafEffect
=
0
;
lpSoundSentry
A
->
iFSGrafEffectMSec
=
0
;
lpSoundSentry
W
->
iFSGrafEffectMSec
=
0
;
lpSoundSentry
A
->
iFSGrafEffectColor
=
0
;
lpSoundSentry
W
->
iFSGrafEffectColor
=
0
;
lpSoundSentry
A
->
iWindowsEffect
=
0
;
lpSoundSentry
W
->
iWindowsEffect
=
0
;
lpSoundSentry
A
->
iWindowsEffectMSec
=
0
;
lpSoundSentry
W
->
iWindowsEffectMSec
=
0
;
lpSoundSentry
A
->
lpszWindowsEffectDLL
=
0
;
lpSoundSentry
W
->
lpszWindowsEffectDLL
=
0
;
lpSoundSentry
A
->
iWindowsEffectOrdinal
=
0
;
lpSoundSentry
W
->
iWindowsEffectOrdinal
=
0
;
}
}
else
else
{
{
...
@@ -1561,13 +1590,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1561,13 +1590,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETHIGHCONTRAST
:
/* 66 WINVER >= 0x400 */
case
SPI_GETHIGHCONTRAST
:
/* 66 WINVER >= 0x400 */
{
{
LPHIGHCONTRAST
A
lpHighContrastA
=
(
LPHIGHCONTRASTA
)
pvParam
;
LPHIGHCONTRAST
W
lpHighContrastW
=
(
LPHIGHCONTRASTW
)
pvParam
;
WARN
(
"SPI_GETHIGHCONTRAST not fully implemented
\n
"
);
WARN
(
"SPI_GETHIGHCONTRAST not fully implemented
\n
"
);
if
(
lpHighContrast
A
&&
lpHighContrastA
->
cbSize
==
sizeof
(
HIGHCONTRASTA
))
if
(
lpHighContrast
W
&&
lpHighContrastW
->
cbSize
==
sizeof
(
HIGHCONTRASTW
))
{
{
/* Indicate that no high contrast feature available */
/* Indicate that no high contrast feature available */
lpHighContrast
A
->
dwFlags
=
0
;
lpHighContrast
W
->
dwFlags
=
0
;
lpHighContrast
A
->
lpszDefaultScheme
=
NULL
;
lpHighContrast
W
->
lpszDefaultScheme
=
NULL
;
}
}
else
else
{
{
...
@@ -1583,11 +1612,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1583,11 +1612,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETKEYBOARDPREF_IDX
;
spi_idx
=
SPI_SETKEYBOARDPREF_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDPREF_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETKEYBOARDPREF_REGKEY
,
SPI_SETKEYBOARDPREF_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETKEYBOARDPREF_VALNAME
,
buf
,
sizeof
(
buf
)
))
keyboard_pref
=
atoi
(
buf
);
keyboard_pref
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1596,10 +1625,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1596,10 +1625,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETKEYBOARDPREF
:
/* 69 WINVER >= 0x400 */
case
SPI_SETKEYBOARDPREF
:
/* 69 WINVER >= 0x400 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETKEYBOARDPREF_IDX
;
spi_idx
=
SPI_SETKEYBOARDPREF_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDPREF_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETKEYBOARDPREF_REGKEY
,
SPI_SETKEYBOARDPREF_VALNAME
,
SPI_SETKEYBOARDPREF_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1618,11 +1647,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1618,11 +1647,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETSCREENREADER_IDX
;
spi_idx
=
SPI_SETSCREENREADER_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETSCREENREADER_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETSCREENREADER_REGKEY
,
SPI_SETSCREENREADER_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETSCREENREADER_VALNAME
,
buf
,
sizeof
(
buf
)
))
screen_reader
=
atoi
(
buf
);
screen_reader
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1631,10 +1660,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1631,10 +1660,10 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETSCREENREADER
:
/* 71 WINVER >= 0x400 */
case
SPI_SETSCREENREADER
:
/* 71 WINVER >= 0x400 */
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETSCREENREADER_IDX
;
spi_idx
=
SPI_SETSCREENREADER_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
if
(
SYSPARAMS_Save
(
SPI_SETSCREENREADER_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETSCREENREADER_REGKEY
,
SPI_SETSCREENREADER_VALNAME
,
SPI_SETSCREENREADER_VALNAME
,
buf
,
fWinIni
))
buf
,
fWinIni
))
...
@@ -1666,7 +1695,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1666,7 +1695,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETFONTSMOOTHING_IDX
;
spi_idx
=
SPI_SETFONTSMOOTHING_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETFONTSMOOTHING_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETFONTSMOOTHING_REGKEY
,
SPI_SETFONTSMOOTHING_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETFONTSMOOTHING_VALNAME
,
buf
,
sizeof
(
buf
)
))
...
@@ -1721,15 +1750,15 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1721,15 +1750,15 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_SETSCREENSAVERRUNNING
:
/* 97 WINVER >= 0x400 */
case
SPI_SETSCREENSAVERRUNNING
:
/* 97 WINVER >= 0x400 */
{
{
/* SPI_SCREENSAVERRUNNING is an alias for SPI_SETSCREENSAVERRUNNING */
/* SPI_SCREENSAVERRUNNING is an alias for SPI_SETSCREENSAVERRUNNING */
char
buf
[
5
];
WCHAR
buf
[
5
];
spi_idx
=
SPI_SETSCREENSAVERRUNNING_IDX
;
spi_idx
=
SPI_SETSCREENSAVERRUNNING_IDX
;
sprintf
(
buf
,
"%u"
,
uiParam
);
wsprintfW
(
buf
,
CSu
,
uiParam
);
/* save only temporarily */
/* save only temporarily */
if
(
SYSPARAMS_Save
(
SPI_SETSCREENSAVERRUNNING_REGKEY
,
if
(
SYSPARAMS_Save
(
SPI_SETSCREENSAVERRUNNING_REGKEY
,
SPI_SETSCREENSAVERRUNNING_VALNAME
,
SPI_SETSCREENSAVERRUNNING_VALNAME
,
buf
,
0
))
buf
,
0
))
{
{
screensaver_running
=
uiParam
;
screensaver_running
=
uiParam
;
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
...
@@ -1743,18 +1772,21 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1743,18 +1772,21 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
*
(
UINT
*
)
pvParam
=
4
;
*
(
UINT
*
)
pvParam
=
4
;
break
;
break
;
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERWIDTH
);
/* 99 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERWIDTH
);
/* 99 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERHEIGHT
:
/* 100 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERHEIGHT
:
/* 100 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
*
(
UINT
*
)
pvParam
=
4
;
*
(
UINT
*
)
pvParam
=
4
;
break
;
break
;
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERHEIGHT
);
/* 101 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERHEIGHT
);
/* 101 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERTIME
:
/* 102 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETMOUSEHOVERTIME
:
/* 102 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
*
(
UINT
*
)
pvParam
=
400
;
/* default for menu dropdowns */
*
(
UINT
*
)
pvParam
=
400
;
/* default for menu dropdowns */
break
;
break
;
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERTIME
);
/* 103 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
WINE_SPI_FIXME
(
SPI_SETMOUSEHOVERTIME
);
/* 103 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETWHEELSCROLLLINES
:
/* 104 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
case
SPI_GETWHEELSCROLLLINES
:
/* 104 _WIN32_WINNT >= 0x400 || _WIN32_WINDOW > 0x400 */
...
@@ -1778,11 +1810,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1778,11 +1810,11 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETSCREENSAVERRUNNING_IDX
;
spi_idx
=
SPI_SETSCREENSAVERRUNNING_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETSCREENSAVERRUNNING_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETSCREENSAVERRUNNING_REGKEY
,
SPI_SETSCREENSAVERRUNNING_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETSCREENSAVERRUNNING_VALNAME
,
buf
,
sizeof
(
buf
)
))
screensaver_running
=
atoi
(
buf
);
screensaver_running
=
atoi
W
(
buf
);
spi_loaded
[
spi_idx
]
=
TRUE
;
spi_loaded
[
spi_idx
]
=
TRUE
;
}
}
...
@@ -1791,7 +1823,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1791,7 +1823,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
case
SPI_GETDESKWALLPAPER
:
/* 115 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
case
SPI_GETDESKWALLPAPER
:
/* 115 _WIN32_WINNT >= 0x500 || _WIN32_WINDOW > 0x400 */
{
{
char
buf
[
MAX_PATH
];
WCHAR
buf
[
MAX_PATH
];
if
(
!
pvParam
)
return
FALSE
;
if
(
!
pvParam
)
return
FALSE
;
...
@@ -1802,12 +1834,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1802,12 +1834,12 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
SYSPARAMS_Load
(
SPI_SETDESKWALLPAPER_REGKEY
,
SPI_SETDESKWALLPAPER_VALNAME
,
buf
,
sizeof
(
buf
)))
if
(
SYSPARAMS_Load
(
SPI_SETDESKWALLPAPER_REGKEY
,
SPI_SETDESKWALLPAPER_VALNAME
,
buf
,
sizeof
(
buf
)))
{
{
strncpy
((
char
*
)
pvParam
,
buf
,
uiParam
);
lstrcpynW
((
WCHAR
*
)
pvParam
,
buf
,
uiParam
);
}
}
else
else
{
{
/* Return an empty string */
/* Return an empty string */
memset
((
char
*
)
pvParam
,
0
,
uiParam
);
memset
((
WCHAR
*
)
pvParam
,
0
,
uiParam
);
}
}
break
;
break
;
...
@@ -1826,7 +1858,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1826,7 +1858,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETLISTBOXSMOOTHSCROLLING_IDX
;
spi_idx
=
SPI_SETLISTBOXSMOOTHSCROLLING_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_SETLISTBOXSMOOTHSCROLLING_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_SETLISTBOXSMOOTHSCROLLING_REGKEY
,
SPI_SETLISTBOXSMOOTHSCROLLING_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_SETLISTBOXSMOOTHSCROLLING_VALNAME
,
buf
,
sizeof
(
buf
)
))
...
@@ -1851,7 +1883,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1851,7 +1883,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETGRADIENTCAPTIONS_IDX
;
spi_idx
=
SPI_SETGRADIENTCAPTIONS_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
...
@@ -1876,7 +1908,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1876,7 +1908,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETKEYBOARDCUES_IDX
;
spi_idx
=
SPI_SETKEYBOARDCUES_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
...
@@ -1902,7 +1934,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
...
@@ -1902,7 +1934,7 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
spi_idx
=
SPI_SETHOTTRACKING_IDX
;
spi_idx
=
SPI_SETHOTTRACKING_IDX
;
if
(
!
spi_loaded
[
spi_idx
])
if
(
!
spi_loaded
[
spi_idx
])
{
{
char
buf
[
5
];
WCHAR
buf
[
5
];
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
if
(
SYSPARAMS_Load
(
SPI_USERPREFERENCEMASK_REGKEY
,
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
SPI_USERPREFERENCEMASK_VALNAME
,
buf
,
sizeof
(
buf
)
))
...
@@ -2049,9 +2081,9 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
...
@@ -2049,9 +2081,9 @@ BOOL16 WINAPI SystemParametersInfo16( UINT16 uAction, UINT16 uParam,
}
}
/***********************************************************************
/***********************************************************************
* SystemParametersInfo
W
(USER32.@)
* SystemParametersInfo
A
(USER32.@)
*/
*/
BOOL
WINAPI
SystemParametersInfo
W
(
UINT
uiAction
,
UINT
uiParam
,
BOOL
WINAPI
SystemParametersInfo
A
(
UINT
uiAction
,
UINT
uiParam
,
PVOID
pvParam
,
UINT
fuWinIni
)
PVOID
pvParam
,
UINT
fuWinIni
)
{
{
BOOL
ret
;
BOOL
ret
;
...
@@ -2063,34 +2095,34 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
...
@@ -2063,34 +2095,34 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case
SPI_SETDESKWALLPAPER
:
/* 20 */
case
SPI_SETDESKWALLPAPER
:
/* 20 */
case
SPI_SETDESKPATTERN
:
/* 21 */
case
SPI_SETDESKPATTERN
:
/* 21 */
{
{
char
buffer
[
256
];
WCHAR
buffer
[
256
];
if
(
pvParam
)
if
(
pvParam
)
if
(
!
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPW
STR
)
pvParam
,
-
1
,
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LP
STR
)
pvParam
,
-
1
,
buffer
,
sizeof
(
buffer
)
,
NULL
,
NULL
))
buffer
,
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
))
buffer
[
sizeof
(
buffer
)
-
1
]
=
0
;
buffer
[
sizeof
(
buffer
)
/
sizeof
(
WCHAR
)
-
1
]
=
0
;
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
pvParam
?
buffer
:
NULL
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
pvParam
?
buffer
:
NULL
,
fuWinIni
);
break
;
break
;
}
}
case
SPI_GETICONTITLELOGFONT
:
/* 31 */
case
SPI_GETICONTITLELOGFONT
:
/* 31 */
{
{
LOGFONT
A
tmp
;
LOGFONT
W
tmp
;
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
pvParam
?
&
tmp
:
NULL
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
pvParam
?
&
tmp
:
NULL
,
fuWinIni
);
if
(
ret
&&
pvParam
)
if
(
ret
&&
pvParam
)
SYSPARAMS_LogFont32
ATo32W
(
&
tmp
,
(
LPLOGFONTW
)
pvParam
);
SYSPARAMS_LogFont32
WTo32A
(
&
tmp
,
(
LPLOGFONTA
)
pvParam
);
break
;
break
;
}
}
case
SPI_GETNONCLIENTMETRICS
:
/* 41 WINVER >= 0x400 */
case
SPI_GETNONCLIENTMETRICS
:
/* 41 WINVER >= 0x400 */
{
{
NONCLIENTMETRICS
A
tmp
;
NONCLIENTMETRICS
W
tmp
;
LPNONCLIENTMETRICS
W
lpnmW
=
(
LPNONCLIENTMETRICSW
)
pvParam
;
LPNONCLIENTMETRICS
A
lpnmA
=
(
LPNONCLIENTMETRICSA
)
pvParam
;
if
(
lpnm
W
&&
lpnmW
->
cbSize
==
sizeof
(
NONCLIENTMETRICSW
))
if
(
lpnm
A
&&
lpnmA
->
cbSize
==
sizeof
(
NONCLIENTMETRICSA
))
{
{
tmp
.
cbSize
=
sizeof
(
NONCLIENTMETRICS
A
);
tmp
.
cbSize
=
sizeof
(
NONCLIENTMETRICS
W
);
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
if
(
ret
)
if
(
ret
)
SYSPARAMS_NonClientMetrics32
ATo32W
(
&
tmp
,
lpnmW
);
SYSPARAMS_NonClientMetrics32
WTo32A
(
&
tmp
,
lpnmA
);
}
}
else
else
ret
=
FALSE
;
ret
=
FALSE
;
...
@@ -2099,18 +2131,18 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
...
@@ -2099,18 +2131,18 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case
SPI_GETICONMETRICS
:
/* 45 WINVER >= 0x400 */
case
SPI_GETICONMETRICS
:
/* 45 WINVER >= 0x400 */
{
{
ICONMETRICS
A
tmp
;
ICONMETRICS
W
tmp
;
LPICONMETRICS
W
lpimW
=
(
LPICONMETRICSW
)
pvParam
;
LPICONMETRICS
A
lpimA
=
(
LPICONMETRICSA
)
pvParam
;
if
(
lpim
W
&&
lpimW
->
cbSize
==
sizeof
(
ICONMETRICSW
))
if
(
lpim
A
&&
lpimA
->
cbSize
==
sizeof
(
ICONMETRICSA
))
{
{
tmp
.
cbSize
=
sizeof
(
ICONMETRICS
A
);
tmp
.
cbSize
=
sizeof
(
ICONMETRICS
W
);
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
if
(
ret
)
if
(
ret
)
{
{
lpim
W
->
iHorzSpacing
=
tmp
.
iHorzSpacing
;
lpim
A
->
iHorzSpacing
=
tmp
.
iHorzSpacing
;
lpim
W
->
iVertSpacing
=
tmp
.
iVertSpacing
;
lpim
A
->
iVertSpacing
=
tmp
.
iVertSpacing
;
lpim
W
->
iTitleWrap
=
tmp
.
iTitleWrap
;
lpim
A
->
iTitleWrap
=
tmp
.
iTitleWrap
;
SYSPARAMS_LogFont32
ATo32W
(
&
tmp
.
lfFont
,
&
lpimW
->
lfFont
);
SYSPARAMS_LogFont32
WTo32A
(
&
tmp
.
lfFont
,
&
lpimA
->
lfFont
);
}
}
}
}
else
else
...
@@ -2120,16 +2152,16 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
...
@@ -2120,16 +2152,16 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
case
SPI_GETHIGHCONTRAST
:
/* 66 WINVER >= 0x400 */
case
SPI_GETHIGHCONTRAST
:
/* 66 WINVER >= 0x400 */
{
{
HIGHCONTRAST
A
tmp
;
HIGHCONTRAST
W
tmp
;
LPHIGHCONTRAST
W
lphcW
=
(
LPHIGHCONTRASTW
)
pvParam
;
LPHIGHCONTRAST
A
lphcA
=
(
LPHIGHCONTRASTA
)
pvParam
;
if
(
lphc
W
&&
lphcW
->
cbSize
==
sizeof
(
HIGHCONTRASTW
))
if
(
lphc
A
&&
lphcA
->
cbSize
==
sizeof
(
HIGHCONTRASTA
))
{
{
tmp
.
cbSize
=
sizeof
(
HIGHCONTRAST
A
);
tmp
.
cbSize
=
sizeof
(
HIGHCONTRAST
W
);
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
&
tmp
,
fuWinIni
);
if
(
ret
)
if
(
ret
)
{
{
lphc
W
->
dwFlags
=
tmp
.
dwFlags
;
lphc
A
->
dwFlags
=
tmp
.
dwFlags
;
lphc
W
->
lpszDefaultScheme
=
NULL
;
/* FIXME? */
lphc
A
->
lpszDefaultScheme
=
NULL
;
/* FIXME? */
}
}
}
}
else
else
...
@@ -2138,7 +2170,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
...
@@ -2138,7 +2170,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
}
}
default:
default:
ret
=
SystemParametersInfo
A
(
uiAction
,
uiParam
,
pvParam
,
fuWinIni
);
ret
=
SystemParametersInfo
W
(
uiAction
,
uiParam
,
pvParam
,
fuWinIni
);
break
;
break
;
}
}
return
ret
;
return
ret
;
...
@@ -2150,7 +2182,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
...
@@ -2150,7 +2182,7 @@ BOOL WINAPI SystemParametersInfoW( UINT uiAction, UINT uiParam,
*/
*/
BOOL
WINAPI
SetDoubleClickTime
(
UINT
interval
)
BOOL
WINAPI
SetDoubleClickTime
(
UINT
interval
)
{
{
return
SystemParametersInfo
A
(
SPI_SETDOUBLECLICKTIME
,
interval
,
0
,
0
);
return
SystemParametersInfo
W
(
SPI_SETDOUBLECLICKTIME
,
interval
,
0
,
0
);
}
}
...
@@ -2159,7 +2191,7 @@ BOOL WINAPI SetDoubleClickTime( UINT interval )
...
@@ -2159,7 +2191,7 @@ BOOL WINAPI SetDoubleClickTime( UINT interval )
*/
*/
UINT
WINAPI
GetDoubleClickTime
(
void
)
UINT
WINAPI
GetDoubleClickTime
(
void
)
{
{
char
buf
[
10
];
WCHAR
buf
[
10
];
if
(
!
spi_loaded
[
SPI_SETDOUBLECLICKTIME_IDX
])
if
(
!
spi_loaded
[
SPI_SETDOUBLECLICKTIME_IDX
])
{
{
...
@@ -2167,7 +2199,7 @@ UINT WINAPI GetDoubleClickTime(void)
...
@@ -2167,7 +2199,7 @@ UINT WINAPI GetDoubleClickTime(void)
SPI_SETDOUBLECLICKTIME_VALNAME
,
SPI_SETDOUBLECLICKTIME_VALNAME
,
buf
,
sizeof
(
buf
)
))
buf
,
sizeof
(
buf
)
))
{
{
double_click_time
=
atoi
(
buf
);
double_click_time
=
atoi
W
(
buf
);
if
(
!
double_click_time
)
double_click_time
=
500
;
if
(
!
double_click_time
)
double_click_time
=
500
;
}
}
spi_loaded
[
SPI_SETDOUBLECLICKTIME_IDX
]
=
TRUE
;
spi_loaded
[
SPI_SETDOUBLECLICKTIME_IDX
]
=
TRUE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment