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
c77d2e8a
Commit
c77d2e8a
authored
Feb 24, 2024
by
Fabian Maurer
Committed by
Alexandre Julliard
Feb 27, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix AreDpiAwarenessContextsEqual behavior for DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=56360
parent
f541d947
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
sysparams.c
dlls/user32/sysparams.c
+9
-2
sysparams.c
dlls/user32/tests/sysparams.c
+0
-1
No files found.
dlls/user32/sysparams.c
View file @
c77d2e8a
...
...
@@ -636,13 +636,20 @@ BOOL WINAPI SetProcessDpiAwarenessInternal( DPI_AWARENESS awareness )
return
SetProcessDpiAwarenessContext
(
contexts
[
awareness
]
);
}
static
ULONG_PTR
map_awareness_context
(
DPI_AWARENESS_CONTEXT
ctx
)
{
if
(
ctx
==
DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2
||
ctx
==
(
DPI_AWARENESS_CONTEXT
)
0x22
||
ctx
==
(
DPI_AWARENESS_CONTEXT
)
0x80000022
)
return
0x22
;
return
GetAwarenessFromDpiAwarenessContext
(
ctx
);
}
/***********************************************************************
* AreDpiAwarenessContextsEqual (USER32.@)
*/
BOOL
WINAPI
AreDpiAwarenessContextsEqual
(
DPI_AWARENESS_CONTEXT
ctx1
,
DPI_AWARENESS_CONTEXT
ctx2
)
{
DPI_AWARENESS
aware1
=
GetAwarenessFromDpiAwarenessC
ontext
(
ctx1
);
DPI_AWARENESS
aware2
=
GetAwarenessFromDpiAwarenessC
ontext
(
ctx2
);
DPI_AWARENESS
aware1
=
map_awareness_c
ontext
(
ctx1
);
DPI_AWARENESS
aware2
=
map_awareness_c
ontext
(
ctx2
);
return
aware1
!=
DPI_AWARENESS_INVALID
&&
aware1
==
aware2
;
}
...
...
dlls/user32/tests/sysparams.c
View file @
c77d2e8a
...
...
@@ -3866,7 +3866,6 @@ static void test_AreDpiAwarenessContextsEqual(ULONG_PTR flags)
int
map_i
=
map_context
(
contexts
[
i
],
flags
);
int
map_j
=
map_context
(
contexts
[
j
],
flags
);
BOOL
equal_expected
=
map_i
==
map_j
;
todo_wine_if
((
map_i
==
0x22
&&
map_j
==
0x12
)
||
(
map_j
==
0x22
&&
map_i
==
0x12
))
ok
(
equal
==
equal_expected
,
"(%d, %d) (%p == %p) - Expected equal to be %d but got %d
\n
"
,
i
,
j
,
(
DPI_AWARENESS_CONTEXT
)
contexts
[
i
],
(
DPI_AWARENESS_CONTEXT
)
contexts
[
j
],
equal_expected
,
equal
);
}
}
...
...
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