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
bd8de2a8
Commit
bd8de2a8
authored
Sep 09, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Introduce a new internal WINE_DM_UNSUPPORTED display flag.
parent
a225ad4e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
7 deletions
+15
-7
sysparams.c
dlls/win32u/sysparams.c
+4
-0
display.c
dlls/winemac.drv/display.c
+9
-7
gdi_driver.h
include/wine/gdi_driver.h
+2
-0
No files found.
dlls/win32u/sysparams.c
View file @
bd8de2a8
...
...
@@ -2136,6 +2136,8 @@ static const DEVMODEW *find_display_mode( const DEVMODEW *modes, DEVMODEW *devmo
for
(
mode
=
modes
;
mode
&&
mode
->
dmSize
;
mode
=
NEXT_DEVMODEW
(
mode
))
{
if
((
mode
->
dmFields
&
DM_DISPLAYFLAGS
)
&&
(
mode
->
dmDisplayFlags
&
WINE_DM_UNSUPPORTED
))
continue
;
if
((
devmode
->
dmFields
&
DM_BITSPERPEL
)
&&
devmode
->
dmBitsPerPel
&&
devmode
->
dmBitsPerPel
!=
mode
->
dmBitsPerPel
)
continue
;
if
((
devmode
->
dmFields
&
DM_PELSWIDTH
)
&&
devmode
->
dmPelsWidth
!=
mode
->
dmPelsWidth
)
...
...
@@ -2527,6 +2529,8 @@ BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD index, DEVM
else
ret
=
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
devmode
);
adapter_release
(
adapter
);
devmode
->
dmDisplayFlags
&=
~
WINE_DM_UNSUPPORTED
;
if
(
!
ret
)
WARN
(
"Failed to query %s display settings.
\n
"
,
debugstr_us
(
device
)
);
else
TRACE
(
"position %dx%d, resolution %ux%u, frequency %u, depth %u, orientation %#x.
\n
"
,
devmode
->
dmPosition
.
x
,
devmode
->
dmPosition
.
y
,
devmode
->
dmPelsWidth
,
devmode
->
dmPelsHeight
,
...
...
dlls/winemac.drv/display.c
View file @
bd8de2a8
...
...
@@ -97,6 +97,13 @@ static int display_mode_bits_per_pixel(CGDisplayModeRef display_mode)
}
static
BOOL
display_mode_is_supported
(
CGDisplayModeRef
display_mode
)
{
uint32_t
io_flags
=
CGDisplayModeGetIOFlags
(
display_mode
);
return
(
io_flags
&
kDisplayModeValidFlag
)
&&
(
io_flags
&
kDisplayModeSafeFlag
);
}
static
void
display_mode_to_devmode
(
CGDirectDisplayID
display_id
,
CGDisplayModeRef
display_mode
,
DEVMODEW
*
devmode
)
{
uint32_t
io_flags
;
...
...
@@ -124,6 +131,8 @@ static void display_mode_to_devmode(CGDirectDisplayID display_id, CGDisplayModeR
devmode
->
dmDisplayFlags
=
0
;
if
(
io_flags
&
kDisplayModeInterlacedFlag
)
devmode
->
dmDisplayFlags
|=
DM_INTERLACED
;
if
(
!
display_mode_is_supported
(
display_mode
))
devmode
->
dmDisplayFlags
|=
WINE_DM_UNSUPPORTED
;
devmode
->
dmFields
|=
DM_DISPLAYFLAGS
;
devmode
->
dmDisplayFrequency
=
CGDisplayModeGetRefreshRate
(
display_mode
);
...
...
@@ -417,13 +426,6 @@ static int get_default_bpp(void)
}
static
BOOL
display_mode_is_supported
(
CGDisplayModeRef
display_mode
)
{
uint32_t
io_flags
=
CGDisplayModeGetIOFlags
(
display_mode
);
return
(
io_flags
&
kDisplayModeValidFlag
)
&&
(
io_flags
&
kDisplayModeSafeFlag
);
}
#if defined(MAC_OS_X_VERSION_10_8) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_8
static
CFDictionaryRef
create_mode_dict
(
CGDisplayModeRef
display_mode
,
BOOL
is_original
)
{
...
...
include/wine/gdi_driver.h
View file @
bd8de2a8
...
...
@@ -269,6 +269,8 @@ struct gdi_device_manager
void
(
*
add_mode
)(
const
DEVMODEW
*
mode
,
void
*
param
);
};
#define WINE_DM_UNSUPPORTED 0x80000000
struct
tagUPDATELAYEREDWINDOWINFO
;
struct
user_driver_funcs
...
...
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