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
2712eb50
Commit
2712eb50
authored
Nov 01, 2007
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Nov 01, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Initialize more fields in the DEVMODE structure.
parent
d43fdc5a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
10 deletions
+32
-10
sysparams.c
dlls/user32/sysparams.c
+16
-8
settings.c
dlls/winex11.drv/settings.c
+16
-2
No files found.
dlls/user32/sysparams.c
View file @
2712eb50
...
...
@@ -2985,7 +2985,6 @@ LONG WINAPI ChangeDisplaySettingsW( LPDEVMODEW devmode, DWORD flags )
LONG
WINAPI
ChangeDisplaySettingsExA
(
LPCSTR
devname
,
LPDEVMODEA
devmode
,
HWND
hwnd
,
DWORD
flags
,
LPVOID
lparam
)
{
DEVMODEW
devmodeW
;
LONG
ret
;
UNICODE_STRING
nameW
;
...
...
@@ -2994,13 +2993,11 @@ LONG WINAPI ChangeDisplaySettingsExA( LPCSTR devname, LPDEVMODEA devmode, HWND h
if
(
devmode
)
{
devmodeW
.
dmBitsPerPel
=
devmode
->
dmBitsPerPel
;
devmodeW
.
dmPelsHeight
=
devmode
->
dmPelsHeight
;
devmodeW
.
dmPelsWidth
=
devmode
->
dmPelsWidth
;
devmodeW
.
dmDisplayFlags
=
devmode
->
dmDisplayFlags
;
devmodeW
.
dmDisplayFrequency
=
devmode
->
dmDisplayFrequency
;
devmodeW
.
dmFields
=
devmode
->
dmFields
;
ret
=
ChangeDisplaySettingsExW
(
nameW
.
Buffer
,
&
devmodeW
,
hwnd
,
flags
,
lparam
);
DEVMODEW
*
devmodeW
;
devmodeW
=
GdiConvertToDevmodeW
(
devmode
);
ret
=
ChangeDisplaySettingsExW
(
nameW
.
Buffer
,
devmodeW
,
hwnd
,
flags
,
lparam
);
HeapFree
(
GetProcessHeap
(),
0
,
devmodeW
);
}
else
{
...
...
@@ -3063,12 +3060,23 @@ BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum,
ret
=
EnumDisplaySettingsExW
(
nameW
.
Buffer
,
iModeNum
,
&
devmodeW
,
dwFlags
);
if
(
ret
)
{
lpDevMode
->
dmSize
=
sizeof
(
*
lpDevMode
);
lpDevMode
->
dmSpecVersion
=
devmodeW
.
dmSpecVersion
;
lpDevMode
->
dmDriverVersion
=
devmodeW
.
dmDriverVersion
;
WideCharToMultiByte
(
CP_ACP
,
0
,
devmodeW
.
dmDeviceName
,
-
1
,
(
LPSTR
)
lpDevMode
->
dmDeviceName
,
CCHDEVICENAME
,
NULL
,
NULL
);
lpDevMode
->
dmDriverExtra
=
0
;
/* FIXME */
lpDevMode
->
dmBitsPerPel
=
devmodeW
.
dmBitsPerPel
;
lpDevMode
->
dmPelsHeight
=
devmodeW
.
dmPelsHeight
;
lpDevMode
->
dmPelsWidth
=
devmodeW
.
dmPelsWidth
;
lpDevMode
->
dmDisplayFlags
=
devmodeW
.
dmDisplayFlags
;
lpDevMode
->
dmDisplayFrequency
=
devmodeW
.
dmDisplayFrequency
;
lpDevMode
->
dmFields
=
devmodeW
.
dmFields
;
lpDevMode
->
dmPosition
.
x
=
devmodeW
.
dmPosition
.
x
;
lpDevMode
->
dmPosition
.
y
=
devmodeW
.
dmPosition
.
y
;
lpDevMode
->
dmDisplayOrientation
=
devmodeW
.
dmDisplayOrientation
;
lpDevMode
->
dmDisplayFixedOutput
=
devmodeW
.
dmDisplayFixedOutput
;
}
if
(
lpszDeviceName
)
RtlFreeUnicodeString
(
&
nameW
);
return
ret
;
...
...
dlls/winex11.drv/settings.c
View file @
2712eb50
...
...
@@ -165,11 +165,25 @@ void X11DRV_Settings_Init(void)
*/
BOOL
X11DRV_EnumDisplaySettingsEx
(
LPCWSTR
name
,
DWORD
n
,
LPDEVMODEW
devmode
,
DWORD
flags
)
{
DWORD
dwBpp
=
screen_depth
;
static
const
WCHAR
dev_name
[
CCHDEVICENAME
]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
' '
,
'X'
,
'1'
,
'1'
,
' '
,
'd'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
DWORD
dwBpp
;
dwBpp
=
screen_depth
;
if
(
dwBpp
==
24
)
dwBpp
=
32
;
devmode
->
dmSize
=
sizeof
(
DEVMODEW
);
devmode
->
dmSpecVersion
=
MAKEWORD
(
1
,
4
);
devmode
->
dmDriverVersion
=
MAKEWORD
(
1
,
4
);
memcpy
(
devmode
->
dmDeviceName
,
dev_name
,
sizeof
(
dev_name
));
devmode
->
dmDriverExtra
=
0
;
devmode
->
dmDisplayFlags
=
0
;
devmode
->
dmDisplayFrequency
=
0
;
devmode
->
dmSize
=
sizeof
(
DEVMODEW
);
devmode
->
dmPosition
.
x
=
0
;
devmode
->
dmPosition
.
y
=
0
;
devmode
->
dmDisplayOrientation
=
0
;
devmode
->
dmDisplayFixedOutput
=
0
;
if
(
n
==
ENUM_CURRENT_SETTINGS
)
{
TRACE
(
"mode %d (current) -- getting current mode (%s)
\n
"
,
n
,
handler_name
);
...
...
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