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
cb80a250
Commit
cb80a250
authored
Aug 18, 2022
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Return DEFAULT_CHARSET from SPI_GETICONTITLELOGFONT and SPI_GETNONCLIENTMETRICS.
Signed-off-by:
Dmitry Timoshkov
<
dmitry@baikal.ru
>
parent
f4fd21e3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
2 deletions
+5
-2
sysparams.c
dlls/user32/tests/sysparams.c
+1
-2
sysparams.c
dlls/win32u/sysparams.c
+4
-0
No files found.
dlls/user32/tests/sysparams.c
View file @
cb80a250
...
@@ -4151,14 +4151,13 @@ static void test_LOGFONT_charset(void)
...
@@ -4151,14 +4151,13 @@ static void test_LOGFONT_charset(void)
ret
=
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
sizeof
(
lf
),
&
lf
,
FALSE
);
ret
=
SystemParametersInfoA
(
SPI_GETICONTITLELOGFONT
,
sizeof
(
lf
),
&
lf
,
FALSE
);
ok
(
ret
,
"SystemParametersInfoW error %lu
\n
"
,
GetLastError
());
ok
(
ret
,
"SystemParametersInfoW error %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
lf
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
lf
.
lfCharSet
);
ok
(
lf
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
lf
.
lfCharSet
);
ncm
.
cbSize
=
FIELD_OFFSET
(
NONCLIENTMETRICSA
,
iPaddedBorderWidth
);
ncm
.
cbSize
=
FIELD_OFFSET
(
NONCLIENTMETRICSA
,
iPaddedBorderWidth
);
ret
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
ret
=
SystemParametersInfoA
(
SPI_GETNONCLIENTMETRICS
,
0
,
&
ncm
,
0
);
ok
(
ret
,
"SystemParametersInfoW error %lu
\n
"
,
GetLastError
());
ok
(
ret
,
"SystemParametersInfoW error %lu
\n
"
,
GetLastError
());
todo_wine
ok
(
ncm
.
lfCaptionFont
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
ncm
.
lfCaptionFont
.
lfCharSet
);
ok
(
ncm
.
lfCaptionFont
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
ncm
.
lfCaptionFont
.
lfCharSet
);
ok
(
ncm
.
lfSmCaptionFont
.
lfCharSet
==
DEFAULT_CHARSET
,
"got %d
\n
"
,
ncm
.
lfSmCaptionFont
.
lfCharSet
);
}
}
START_TEST
(
sysparams
)
START_TEST
(
sysparams
)
...
...
dlls/win32u/sysparams.c
View file @
cb80a250
...
@@ -4247,12 +4247,14 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
...
@@ -4247,12 +4247,14 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
switch
(
load_entry
(
&
entry
->
hdr
,
&
font
,
sizeof
(
font
)
))
switch
(
load_entry
(
&
entry
->
hdr
,
&
font
,
sizeof
(
font
)
))
{
{
case
sizeof
(
font
):
case
sizeof
(
font
):
font
.
lfCharSet
=
DEFAULT_CHARSET
;
if
(
font
.
lfHeight
>
0
)
/* positive height value means points ( inch/72 ) */
if
(
font
.
lfHeight
>
0
)
/* positive height value means points ( inch/72 ) */
font
.
lfHeight
=
-
muldiv
(
font
.
lfHeight
,
USER_DEFAULT_SCREEN_DPI
,
72
);
font
.
lfHeight
=
-
muldiv
(
font
.
lfHeight
,
USER_DEFAULT_SCREEN_DPI
,
72
);
entry
->
font
.
val
=
font
;
entry
->
font
.
val
=
font
;
break
;
break
;
case
sizeof
(
LOGFONT16
):
/* win9x-winME format */
case
sizeof
(
LOGFONT16
):
/* win9x-winME format */
logfont16to32
(
(
LOGFONT16
*
)
&
font
,
&
entry
->
font
.
val
);
logfont16to32
(
(
LOGFONT16
*
)
&
font
,
&
entry
->
font
.
val
);
entry
->
font
.
val
.
lfCharSet
=
DEFAULT_CHARSET
;
if
(
entry
->
font
.
val
.
lfHeight
>
0
)
if
(
entry
->
font
.
val
.
lfHeight
>
0
)
entry
->
font
.
val
.
lfHeight
=
-
muldiv
(
entry
->
font
.
val
.
lfHeight
,
USER_DEFAULT_SCREEN_DPI
,
72
);
entry
->
font
.
val
.
lfHeight
=
-
muldiv
(
entry
->
font
.
val
.
lfHeight
,
USER_DEFAULT_SCREEN_DPI
,
72
);
break
;
break
;
...
@@ -4263,6 +4265,7 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
...
@@ -4263,6 +4265,7 @@ static BOOL get_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
/* fall through */
/* fall through */
case
0
:
/* use the default GUI font */
case
0
:
/* use the default GUI font */
NtGdiExtGetObjectW
(
GetStockObject
(
DEFAULT_GUI_FONT
),
sizeof
(
font
),
&
font
);
NtGdiExtGetObjectW
(
GetStockObject
(
DEFAULT_GUI_FONT
),
sizeof
(
font
),
&
font
);
font
.
lfCharSet
=
DEFAULT_CHARSET
;
font
.
lfHeight
=
map_from_system_dpi
(
font
.
lfHeight
);
font
.
lfHeight
=
map_from_system_dpi
(
font
.
lfHeight
);
font
.
lfWeight
=
entry
->
font
.
weight
;
font
.
lfWeight
=
entry
->
font
.
weight
;
entry
->
font
.
val
=
font
;
entry
->
font
.
val
=
font
;
...
@@ -4302,6 +4305,7 @@ static BOOL set_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
...
@@ -4302,6 +4305,7 @@ static BOOL set_font_entry( union sysparam_all_entry *entry, UINT int_param, voi
static
BOOL
init_font_entry
(
union
sysparam_all_entry
*
entry
)
static
BOOL
init_font_entry
(
union
sysparam_all_entry
*
entry
)
{
{
NtGdiExtGetObjectW
(
GetStockObject
(
DEFAULT_GUI_FONT
),
sizeof
(
entry
->
font
.
val
),
&
entry
->
font
.
val
);
NtGdiExtGetObjectW
(
GetStockObject
(
DEFAULT_GUI_FONT
),
sizeof
(
entry
->
font
.
val
),
&
entry
->
font
.
val
);
entry
->
font
.
val
.
lfCharSet
=
DEFAULT_CHARSET
;
entry
->
font
.
val
.
lfHeight
=
map_from_system_dpi
(
entry
->
font
.
val
.
lfHeight
);
entry
->
font
.
val
.
lfHeight
=
map_from_system_dpi
(
entry
->
font
.
val
.
lfHeight
);
entry
->
font
.
val
.
lfWeight
=
entry
->
font
.
weight
;
entry
->
font
.
val
.
lfWeight
=
entry
->
font
.
weight
;
get_real_fontname
(
&
entry
->
font
.
val
,
entry
->
font
.
fullname
);
get_real_fontname
(
&
entry
->
font
.
val
,
entry
->
font
.
fullname
);
...
...
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