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
5fa90ca9
Commit
5fa90ca9
authored
Dec 14, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Add a test for EnumDisplaySettings vs GetDeviceCaps.
parent
920506b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
0 deletions
+32
-0
sysparams.c
dlls/user32/tests/sysparams.c
+32
-0
No files found.
dlls/user32/tests/sysparams.c
View file @
5fa90ca9
...
@@ -2521,6 +2521,36 @@ static void test_GetSystemMetrics( void)
...
@@ -2521,6 +2521,36 @@ static void test_GetSystemMetrics( void)
ReleaseDC
(
0
,
hdc
);
ReleaseDC
(
0
,
hdc
);
}
}
static
void
test_EnumDisplaySettings
(
void
)
{
DEVMODE
devmode
;
DWORD
val
;
HDC
hdc
;
memset
(
&
devmode
,
0
,
sizeof
(
devmode
));
devmode
.
dmSize
=
sizeof
(
devmode
);
EnumDisplaySettings
(
NULL
,
ENUM_CURRENT_SETTINGS
,
&
devmode
);
hdc
=
GetDC
(
0
);
val
=
GetDeviceCaps
(
hdc
,
BITSPIXEL
);
if
(
devmode
.
dmBitsPerPel
==
32
&&
val
==
24
)
{
todo_wine
ok
(
devmode
.
dmBitsPerPel
==
val
,
"GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d
\n
"
,
val
,
devmode
.
dmBitsPerPel
);
}
else
{
ok
(
devmode
.
dmBitsPerPel
==
val
,
"GetDeviceCaps(BITSPIXEL) returned %d, EnumDisplaySettings returned %d
\n
"
,
val
,
devmode
.
dmBitsPerPel
);
}
val
=
GetDeviceCaps
(
hdc
,
NUMCOLORS
);
if
(
devmode
.
dmBitsPerPel
<=
8
)
{
ok
(
val
==
256
,
"Screen bpp is %d, NUMCOLORS returned %d
\n
"
,
devmode
.
dmBitsPerPel
,
val
);
}
else
{
ok
(
val
==
-
1
,
"Screen bpp is %d, NUMCOLORS returned %d
\n
"
,
devmode
.
dmBitsPerPel
,
val
);
}
ReleaseDC
(
0
,
hdc
);
}
START_TEST
(
sysparams
)
START_TEST
(
sysparams
)
{
{
int
argc
;
int
argc
;
...
@@ -2545,6 +2575,8 @@ START_TEST(sysparams)
...
@@ -2545,6 +2575,8 @@ START_TEST(sysparams)
trace
(
"testing GetSystemMetrics with your current desktop settings
\n
"
);
trace
(
"testing GetSystemMetrics with your current desktop settings
\n
"
);
test_GetSystemMetrics
(
);
test_GetSystemMetrics
(
);
trace
(
"testing EnumDisplaySettings vs GetDeviceCaps
\n
"
);
test_EnumDisplaySettings
(
);
change_counter
=
0
;
change_counter
=
0
;
change_last_param
=
0
;
change_last_param
=
0
;
...
...
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