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
22ce57c4
Commit
22ce57c4
authored
Apr 04, 2023
by
Alexandros Frantzis
Committed by
Alexandre Julliard
Apr 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winex11.drv: Extract function to check devmode equality.
Signed-off-by:
Alexandros Frantzis
<
alexandros.frantzis@collabora.com
>
parent
df8b7e04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
13 deletions
+10
-13
display.c
dlls/winex11.drv/display.c
+10
-13
No files found.
dlls/winex11.drv/display.c
View file @
22ce57c4
...
...
@@ -278,6 +278,15 @@ BOOL is_detached_mode(const DEVMODEW *mode)
mode
->
dmPelsHeight
==
0
;
}
static
BOOL
is_same_devmode
(
const
DEVMODEW
*
a
,
const
DEVMODEW
*
b
)
{
return
a
->
dmDisplayOrientation
==
b
->
dmDisplayOrientation
&&
a
->
dmBitsPerPel
==
b
->
dmBitsPerPel
&&
a
->
dmPelsWidth
==
b
->
dmPelsWidth
&&
a
->
dmPelsHeight
==
b
->
dmPelsHeight
&&
a
->
dmDisplayFrequency
==
b
->
dmDisplayFrequency
;
}
/* Get the full display mode with all the necessary fields set.
* Return NULL on failure. Caller should call free_full_mode() to free the returned mode. */
static
DEVMODEW
*
get_full_mode
(
ULONG_PTR
id
,
DEVMODEW
*
dev_mode
)
...
...
@@ -294,19 +303,7 @@ static DEVMODEW *get_full_mode(ULONG_PTR id, DEVMODEW *dev_mode)
for
(
mode_idx
=
0
;
mode_idx
<
mode_count
;
++
mode_idx
)
{
found_mode
=
(
DEVMODEW
*
)((
BYTE
*
)
modes
+
(
sizeof
(
*
modes
)
+
modes
[
0
].
dmDriverExtra
)
*
mode_idx
);
if
(
found_mode
->
dmBitsPerPel
!=
dev_mode
->
dmBitsPerPel
)
continue
;
if
(
found_mode
->
dmPelsWidth
!=
dev_mode
->
dmPelsWidth
)
continue
;
if
(
found_mode
->
dmPelsHeight
!=
dev_mode
->
dmPelsHeight
)
continue
;
if
(
found_mode
->
dmDisplayFrequency
!=
dev_mode
->
dmDisplayFrequency
)
continue
;
if
(
found_mode
->
dmDisplayOrientation
!=
dev_mode
->
dmDisplayOrientation
)
continue
;
break
;
if
(
is_same_devmode
(
found_mode
,
dev_mode
))
break
;
}
if
(
!
found_mode
||
mode_idx
==
mode_count
)
...
...
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