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
66cd3334
Commit
66cd3334
authored
Oct 27, 1998
by
Marcus Meissner
Committed by
Alexandre Julliard
Oct 27, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EnumDisplayModes* returns a static list of modes with all depths
(helps hexen2demo), ChangeDisplaySettings returns true all the time.
parent
d1165095
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
9 deletions
+36
-9
user.c
windows/user.c
+36
-9
No files found.
windows/user.c
View file @
66cd3334
...
...
@@ -326,15 +326,32 @@ LONG WINAPI ChangeDisplaySettings32A( LPDEVMODE32A devmode, DWORD flags )
if
(
devmode
->
dmFields
&
DM_PELSHEIGHT
)
FIXME
(
system
,
" height=%ld
\n
"
,
devmode
->
dmPelsHeight
);
FIXME
(
system
,
" (Putting X in this mode beforehand might help)
\n
"
);
/* we don't, but the program ... does not need to know */
return
DISP_CHANGE_SUCCESSFUL
;
}
return
DISP_CHANGE_SUCCESSFUL
;
}
/***********************************************************************
* EnumDisplaySettingsA (USER32.592)
* FIXME: Currently uses static list of modes.
*
* RETURNS
* TRUE if nth setting exists found (described in the LPDEVMODE32A struct)
* FALSE if we do not have the nth setting
*/
BOOL32
WINAPI
EnumDisplaySettings32A
(
LPCSTR
name
,
DWORD
n
,
LPDEVMODE32A
devmode
)
{
BOOL32
WINAPI
EnumDisplaySettings32A
(
LPCSTR
name
,
/* [in] huh? */
DWORD
n
,
/* [in] nth entry in display settings list*/
LPDEVMODE32A
devmode
/* [out] devmode for that setting */
)
{
#define NRMODES 5
#define NRDEPTHS 4
struct
{
int
w
,
h
;
}
modes
[
NRMODES
]
=
{{
512
,
384
},{
640
,
400
},{
640
,
480
},{
800
,
600
},{
1024
,
768
}};
int
depths
[
4
]
=
{
8
,
16
,
24
,
32
};
TRACE
(
system
,
"(%s,%ld,%p)
\n
"
,
name
,
n
,
devmode
);
if
(
n
==
0
)
{
devmode
->
dmBitsPerPel
=
DefaultDepthOfScreen
(
screen
);
...
...
@@ -342,6 +359,12 @@ BOOL32 WINAPI EnumDisplaySettings32A(LPCSTR name,DWORD n,LPDEVMODE32A devmode) {
devmode
->
dmPelsWidth
=
screenWidth
;
return
TRUE
;
}
if
((
n
-
1
)
<
NRMODES
*
NRDEPTHS
)
{
devmode
->
dmBitsPerPel
=
depths
[(
n
-
1
)
/
NRMODES
];
devmode
->
dmPelsHeight
=
modes
[(
n
-
1
)
%
NRMODES
].
h
;
devmode
->
dmPelsWidth
=
modes
[(
n
-
1
)
%
NRMODES
].
w
;
return
TRUE
;
}
return
FALSE
;
}
...
...
@@ -349,14 +372,18 @@ BOOL32 WINAPI EnumDisplaySettings32A(LPCSTR name,DWORD n,LPDEVMODE32A devmode) {
* EnumDisplaySettingsW (USER32.593)
*/
BOOL32
WINAPI
EnumDisplaySettings32W
(
LPCWSTR
name
,
DWORD
n
,
LPDEVMODE32W
devmode
)
{
TRACE
(
system
,
"(%s,%ld,%p)
\n
"
,
debugstr_w
(
name
),
n
,
devmode
);
if
(
n
==
0
)
{
devmode
->
dmBitsPerPel
=
DefaultDepthOfScreen
(
screen
);
devmode
->
dmPelsHeight
=
screenHeight
;
devmode
->
dmPelsWidth
=
screenWidth
;
return
TRUE
;
LPSTR
nameA
=
HEAP_strdupWtoA
(
GetProcessHeap
(),
0
,
name
);
DEVMODE32A
devmodeA
;
BOOL32
ret
=
EnumDisplaySettings32A
(
nameA
,
n
,
&
devmodeA
);
if
(
ret
)
{
devmode
->
dmBitsPerPel
=
devmodeA
.
dmBitsPerPel
;
devmode
->
dmPelsHeight
=
devmodeA
.
dmPelsHeight
;
devmode
->
dmPelsWidth
=
devmodeA
.
dmPelsWidth
;
/* FIXME: convert rest too, if they are ever returned */
}
return
FALSE
;
HeapFree
(
GetProcessHeap
(),
0
,
nameA
);
return
ret
;
}
/***********************************************************************
...
...
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