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
167b65ca
Commit
167b65ca
authored
Aug 30, 2011
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 31, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Show that ddraw reads ddsCaps without DDSD_CAPS set.
parent
c103d6d2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
0 deletions
+45
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+45
-0
No files found.
dlls/ddraw/tests/dsurface.c
View file @
167b65ca
...
...
@@ -3801,6 +3801,50 @@ static void CreateSurfaceBadCapsSizeTest(void)
IDirectDraw7_Release
(
dd7
);
}
static
void
reset_ddsd
(
DDSURFACEDESC
*
ddsd
)
{
memset
(
ddsd
,
0
,
sizeof
(
*
ddsd
));
ddsd
->
dwSize
=
sizeof
(
*
ddsd
);
}
static
void
no_ddsd_caps_test
(
void
)
{
DDSURFACEDESC
ddsd
;
HRESULT
hr
;
IDirectDrawSurface
*
surface
;
reset_ddsd
(
&
ddsd
);
ddsd
.
dwFlags
=
DDSD_WIDTH
|
DDSD_HEIGHT
;
ddsd
.
dwWidth
=
128
;
ddsd
.
dwHeight
=
128
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_OFFSCREENPLAIN
;
hr
=
IDirectDraw_CreateSurface
(
lpDD
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectDraw_CreateSurface failed, hr %#x.
\n
"
,
hr
);
reset_ddsd
(
&
ddsd
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
surface
,
&
ddsd
);
IDirectDrawSurface_Release
(
surface
);
ok
(
ddsd
.
dwFlags
&
DDSD_CAPS
,
"DDSD_CAPS is not set
\n
"
);
ok
(
ddsd
.
ddsCaps
.
dwCaps
&
DDSCAPS_OFFSCREENPLAIN
,
"DDSCAPS_OFFSCREENPLAIN is not set
\n
"
);
reset_ddsd
(
&
ddsd
);
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_PRIMARYSURFACE
;
hr
=
IDirectDraw_CreateSurface
(
lpDD
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
SUCCEEDED
(
hr
),
"IDirectDraw_CreateSurface failed, hr %#x.
\n
"
,
hr
);
reset_ddsd
(
&
ddsd
);
hr
=
IDirectDrawSurface_GetSurfaceDesc
(
surface
,
&
ddsd
);
IDirectDrawSurface_Release
(
surface
);
ok
(
ddsd
.
dwFlags
&
DDSD_CAPS
,
"DDSD_CAPS is not set
\n
"
);
ok
(
ddsd
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
,
"DDSCAPS_OFFSCREENPLAIN is not set
\n
"
);
reset_ddsd
(
&
ddsd
);
ddsd
.
dwFlags
=
DDSD_WIDTH
|
DDSD_HEIGHT
;
ddsd
.
dwWidth
=
128
;
ddsd
.
dwHeight
=
128
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
;
hr
=
IDirectDraw_CreateSurface
(
lpDD
,
&
ddsd
,
&
surface
,
NULL
);
ok
(
hr
==
DDERR_INVALIDCAPS
,
"IDirectDraw_CreateSurface returned %#x, expected DDERR_INVALIDCAPS.
\n
"
,
hr
);
}
START_TEST
(
dsurface
)
{
HRESULT
ret
;
...
...
@@ -3857,5 +3901,6 @@ START_TEST(dsurface)
BackBufferCreateSurfaceTest
();
BackBufferAttachmentFlipTest
();
CreateSurfaceBadCapsSizeTest
();
no_ddsd_caps_test
();
ReleaseDirectDraw
();
}
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