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
d4654e57
Commit
d4654e57
authored
Jul 05, 2017
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Scale cursor sizes with the screen DPI.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
759dd551
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
2 deletions
+16
-2
sysparams.c
dlls/user32/sysparams.c
+6
-0
sysparams.c
dlls/user32/tests/sysparams.c
+10
-2
No files found.
dlls/user32/sysparams.c
View file @
d4654e57
...
...
@@ -2413,6 +2413,12 @@ INT WINAPI GetSystemMetrics( INT index )
return
ret
;
case
SM_CXCURSOR
:
case
SM_CYCURSOR
:
if
(
IsProcessDPIAware
())
{
ret
=
MulDiv
(
32
,
get_display_dpi
(),
USER_DEFAULT_SCREEN_DPI
);
if
(
ret
>=
64
)
return
64
;
if
(
ret
>=
48
)
return
48
;
}
return
32
;
case
SM_CYMENU
:
return
GetSystemMetrics
(
SM_CYMENUSIZE
)
+
1
;
...
...
dlls/user32/tests/sysparams.c
View file @
d4654e57
...
...
@@ -2696,6 +2696,14 @@ static BOOL is_font_enumerated(const char *name)
return
ret
;
}
static
int
get_cursor_size
(
int
size
)
{
/* only certain sizes are allowed for cursors */
if
(
size
>=
64
)
return
64
;
if
(
size
>=
48
)
return
48
;
return
32
;
}
static
void
test_GetSystemMetrics
(
void
)
{
TEXTMETRICA
tmMenuFont
;
...
...
@@ -2774,8 +2782,8 @@ static void test_GetSystemMetrics( void)
/* These don't depend on the Shell Icon Size registry value */
ok_gsm
(
SM_CXICON
,
MulDiv
(
32
,
dpi
,
USER_DEFAULT_SCREEN_DPI
)
);
ok_gsm
(
SM_CYICON
,
MulDiv
(
32
,
dpi
,
USER_DEFAULT_SCREEN_DPI
)
);
/* SM_CXCURSOR */
/* SM_CYCURSOR */
ok_gsm
(
SM_CXCURSOR
,
get_cursor_size
(
MulDiv
(
32
,
dpi
,
USER_DEFAULT_SCREEN_DPI
)));
ok_gsm
(
SM_CYCURSOR
,
get_cursor_size
(
MulDiv
(
32
,
dpi
,
USER_DEFAULT_SCREEN_DPI
)));
ok_gsm
(
SM_CYMENU
,
ncm
.
iMenuHeight
+
1
);
ok_gsm
(
SM_CXFULLSCREEN
,
GetSystemMetrics
(
SM_CXMAXIMIZED
)
-
2
*
GetSystemMetrics
(
SM_CXFRAME
));
...
...
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