Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
2fec6dd3
Commit
2fec6dd3
authored
Oct 21, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Nov 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
win32u: Add is_primary parameter to GetCurrentDisplaySettings.
parent
81406eac
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
22 additions
and
15 deletions
+22
-15
driver.c
dlls/win32u/driver.c
+3
-3
sysparams.c
dlls/win32u/sysparams.c
+12
-5
init.c
dlls/wineandroid.drv/init.c
+1
-1
display.c
dlls/winemac.drv/display.c
+2
-2
macdrv.h
dlls/winemac.drv/macdrv.h
+1
-1
display.c
dlls/winex11.drv/display.c
+1
-1
x11drv.h
dlls/winex11.drv/x11drv.h
+1
-1
gdi_driver.h
include/wine/gdi_driver.h
+1
-1
No files found.
dlls/win32u/driver.c
View file @
2fec6dd3
...
...
@@ -759,7 +759,7 @@ static LONG nulldrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primary_
return
DISP_CHANGE_FAILED
;
}
static
BOOL
nulldrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
mode
)
static
BOOL
nulldrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
mode
)
{
return
FALSE
;
}
...
...
@@ -1072,9 +1072,9 @@ static LONG loaderdrv_ChangeDisplaySettings( LPDEVMODEW displays, LPCWSTR primar
return
load_driver
()
->
pChangeDisplaySettings
(
displays
,
primary_name
,
hwnd
,
flags
,
lparam
);
}
static
BOOL
loaderdrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
mode
)
static
BOOL
loaderdrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
mode
)
{
return
load_driver
()
->
pGetCurrentDisplaySettings
(
name
,
mode
);
return
load_driver
()
->
pGetCurrentDisplaySettings
(
name
,
is_primary
,
mode
);
}
static
void
loaderdrv_SetCursor
(
HCURSOR
cursor
)
...
...
dlls/win32u/sysparams.c
View file @
2fec6dd3
...
...
@@ -503,6 +503,12 @@ static BOOL adapter_set_registry_settings( const struct adapter *adapter, const
return
ret
;
}
static
BOOL
adapter_get_current_settings
(
const
struct
adapter
*
adapter
,
DEVMODEW
*
mode
)
{
BOOL
is_primary
=
!!
(
adapter
->
dev
.
state_flags
&
DISPLAY_DEVICE_PRIMARY_DEVICE
);
return
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
is_primary
,
mode
);
}
static
int
mode_compare
(
const
void
*
p1
,
const
void
*
p2
)
{
BOOL
a_interlaced
,
b_interlaced
,
a_stretched
,
b_stretched
;
...
...
@@ -2174,7 +2180,8 @@ static BOOL adapter_get_full_mode( const struct adapter *adapter, const DEVMODEW
if
(
!
is_detached_mode
(
full_mode
)
&&
(
!
full_mode
->
dmPelsWidth
||
!
full_mode
->
dmPelsHeight
||
!
(
full_mode
->
dmFields
&
DM_POSITION
)))
{
DEVMODEW
current_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
if
(
!
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
&
current_mode
))
return
FALSE
;
if
(
!
adapter_get_current_settings
(
adapter
,
&
current_mode
))
return
FALSE
;
if
(
!
full_mode
->
dmPelsWidth
)
full_mode
->
dmPelsWidth
=
current_mode
.
dmPelsWidth
;
if
(
!
full_mode
->
dmPelsHeight
)
full_mode
->
dmPelsHeight
=
current_mode
.
dmPelsHeight
;
if
(
!
(
full_mode
->
dmFields
&
DM_POSITION
))
...
...
@@ -2215,7 +2222,7 @@ static DEVMODEW *get_display_settings( const WCHAR *devname, const DEVMODEW *dev
else
{
if
(
!
devname
)
ret
=
adapter_get_registry_settings
(
adapter
,
mode
);
else
ret
=
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
mode
);
else
ret
=
adapter_get_current_settings
(
adapter
,
mode
);
if
(
!
ret
)
goto
done
;
}
...
...
@@ -2457,7 +2464,7 @@ static LONG apply_display_settings( const WCHAR *devname, const DEVMODEW *devmod
if
((
adapter
=
find_adapter
(
NULL
)))
{
DEVMODEW
current_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
&
current_mode
);
adapter_get_current_settings
(
adapter
,
&
current_mode
);
adapter_release
(
adapter
);
send_notify_message
(
NtUserGetDesktopWindow
(),
WM_DISPLAYCHANGE
,
current_mode
.
dmBitsPerPel
,
...
...
@@ -2502,7 +2509,7 @@ static BOOL adapter_enum_display_settings( const struct adapter *adapter, DWORD
DEVMODEW
current_mode
=
{.
dmSize
=
sizeof
(
DEVMODEW
)};
const
DEVMODEW
*
adapter_mode
;
if
(
!
(
flags
&
EDS_ROTATEDMODE
)
&&
!
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
&
current_mode
))
if
(
!
(
flags
&
EDS_ROTATEDMODE
)
&&
!
adapter_get_current_settings
(
adapter
,
&
current_mode
))
{
WARN
(
"Failed to query current display mode for EDS_ROTATEDMODE flag.
\n
"
);
return
FALSE
;
...
...
@@ -2550,7 +2557,7 @@ BOOL WINAPI NtUserEnumDisplaySettings( UNICODE_STRING *device, DWORD index, DEVM
devmode
->
dmDriverExtra
=
0
;
if
(
index
==
ENUM_REGISTRY_SETTINGS
)
ret
=
adapter_get_registry_settings
(
adapter
,
devmode
);
else
if
(
index
==
ENUM_CURRENT_SETTINGS
)
ret
=
user_driver
->
pGetCurrentDisplaySettings
(
adapter
->
dev
.
device_name
,
devmode
);
else
if
(
index
==
ENUM_CURRENT_SETTINGS
)
ret
=
adapter_get_current_settings
(
adapter
,
devmode
);
else
ret
=
adapter_enum_display_settings
(
adapter
,
index
,
devmode
,
flags
);
adapter_release
(
adapter
);
...
...
dlls/wineandroid.drv/init.c
View file @
2fec6dd3
...
...
@@ -306,7 +306,7 @@ BOOL ANDROID_UpdateDisplayDevices( const struct gdi_device_manager *device_manag
/***********************************************************************
* ANDROID_GetCurrentDisplaySettings
*/
BOOL
ANDROID_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
devmode
)
BOOL
ANDROID_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
{
devmode
->
u2
.
dmDisplayFlags
=
0
;
devmode
->
u1
.
s2
.
dmPosition
.
x
=
0
;
...
...
dlls/winemac.drv/display.c
View file @
2fec6dd3
...
...
@@ -893,7 +893,7 @@ static DEVMODEW *display_get_modes(CGDirectDisplayID display_id, int *modes_coun
* GetCurrentDisplaySettings (MACDRV.@)
*
*/
BOOL
macdrv_GetCurrentDisplaySettings
(
LPCWSTR
devname
,
LPDEVMODEW
devmode
)
BOOL
macdrv_GetCurrentDisplaySettings
(
LPCWSTR
devname
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
{
struct
macdrv_display
*
displays
=
NULL
;
int
num_displays
,
display_idx
;
...
...
@@ -901,7 +901,7 @@ BOOL macdrv_GetCurrentDisplaySettings(LPCWSTR devname, LPDEVMODEW devmode)
CGDirectDisplayID
display_id
;
WCHAR
*
end
;
TRACE
(
"%s, %
p + %hu
\n
"
,
debugstr_w
(
devname
)
,
devmode
,
devmode
->
dmSize
);
TRACE
(
"%s, %
u, %p + %hu
\n
"
,
debugstr_w
(
devname
),
is_primary
,
devmode
,
devmode
->
dmSize
);
init_original_display_mode
();
...
...
dlls/winemac.drv/macdrv.h
View file @
2fec6dd3
...
...
@@ -123,7 +123,7 @@ static inline struct macdrv_thread_data *macdrv_thread_data(void)
extern
BOOL
macdrv_ActivateKeyboardLayout
(
HKL
hkl
,
UINT
flags
)
DECLSPEC_HIDDEN
;
extern
void
macdrv_Beep
(
void
)
DECLSPEC_HIDDEN
;
extern
LONG
macdrv_ChangeDisplaySettings
(
LPDEVMODEW
displays
,
LPCWSTR
primary_name
,
HWND
hwnd
,
DWORD
flags
,
LPVOID
lpvoid
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
devmode
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
DECLSPEC_HIDDEN
;
extern
LRESULT
macdrv_ClipboardWindowProc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wp
,
LPARAM
lp
)
DECLSPEC_HIDDEN
;
extern
BOOL
macdrv_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
device_manager
,
BOOL
force
,
void
*
param
)
DECLSPEC_HIDDEN
;
...
...
dlls/winex11.drv/display.c
View file @
2fec6dd3
...
...
@@ -266,7 +266,7 @@ static DWORD get_display_depth(ULONG_PTR display_id)
* GetCurrentDisplaySettings (X11DRV.@)
*
*/
BOOL
X11DRV_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
devmode
)
BOOL
X11DRV_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
{
DEVMODEW
mode
;
ULONG_PTR
id
;
...
...
dlls/winex11.drv/x11drv.h
View file @
2fec6dd3
...
...
@@ -214,7 +214,7 @@ extern BOOL X11DRV_SetCursorPos( INT x, INT y ) DECLSPEC_HIDDEN;
extern
BOOL
X11DRV_GetCursorPos
(
LPPOINT
pos
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_ClipCursor
(
LPCRECT
clip
)
DECLSPEC_HIDDEN
;
extern
LONG
X11DRV_ChangeDisplaySettings
(
LPDEVMODEW
displays
,
LPCWSTR
primary_name
,
HWND
hwnd
,
DWORD
flags
,
LPVOID
lpvoid
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_GetCurrentDisplaySettings
(
LPCWSTR
name
,
LPDEVMODEW
devmode
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_GetCurrentDisplaySettings
(
LPCWSTR
name
,
BOOL
is_primary
,
LPDEVMODEW
devmode
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_UpdateDisplayDevices
(
const
struct
gdi_device_manager
*
device_manager
,
BOOL
force
,
void
*
param
)
DECLSPEC_HIDDEN
;
extern
BOOL
X11DRV_CreateDesktopWindow
(
HWND
hwnd
)
DECLSPEC_HIDDEN
;
...
...
include/wine/gdi_driver.h
View file @
2fec6dd3
...
...
@@ -298,7 +298,7 @@ struct user_driver_funcs
void
(
*
pUpdateClipboard
)(
void
);
/* display modes */
LONG
(
*
pChangeDisplaySettings
)(
LPDEVMODEW
,
LPCWSTR
,
HWND
,
DWORD
,
LPVOID
);
BOOL
(
*
pGetCurrentDisplaySettings
)(
LPCWSTR
,
LPDEVMODEW
);
BOOL
(
*
pGetCurrentDisplaySettings
)(
LPCWSTR
,
BOOL
,
LPDEVMODEW
);
BOOL
(
*
pUpdateDisplayDevices
)(
const
struct
gdi_device_manager
*
,
BOOL
,
void
*
);
/* windowing functions */
BOOL
(
*
pCreateDesktopWindow
)(
HWND
);
...
...
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