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
dbb29993
Commit
dbb29993
authored
Sep 29, 2009
by
Markus Stockhausen
Committed by
Alexandre Julliard
Sep 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Set dwBackBufferCount=0 in CreateSurface for backbuffer.
parent
c0c6daeb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
ddraw.c
dlls/ddraw/ddraw.c
+1
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+10
-2
No files found.
dlls/ddraw/ddraw.c
View file @
dbb29993
...
...
@@ -2492,6 +2492,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
extra_surfaces
=
DDSD
->
dwBackBufferCount
;
desc2
.
ddsCaps
.
dwCaps
&=
~
DDSCAPS_FRONTBUFFER
;
/* It's not a front buffer */
desc2
.
ddsCaps
.
dwCaps
|=
DDSCAPS_BACKBUFFER
;
desc2
.
dwBackBufferCount
=
0
;
}
hr
=
DD_OK
;
...
...
dlls/ddraw/tests/dsurface.c
View file @
dbb29993
...
...
@@ -1154,9 +1154,9 @@ static void AttachmentTest7(void)
HRESULT
hr
;
IDirectDraw7
*
dd7
;
IDirectDrawSurface7
*
surface1
,
*
surface2
,
*
surface3
,
*
surface4
;
DDSURFACEDESC2
ddsd
;
DDSURFACEDESC2
ddsd
,
ddsd2
;
UINT
num
;
DDSCAPS2
caps
=
{
DDSCAPS_TEXTURE
,
0
,
0
,
0
};
DDSCAPS2
caps
=
{
DDSCAPS_TEXTURE
,
0
,
0
,
0
}
,
caps2
=
{
DDSCAPS_BACKBUFFER
,
0
,
0
,
0
}
;
HWND
window
=
CreateWindow
(
"static"
,
"ddraw_test"
,
WS_OVERLAPPEDWINDOW
,
100
,
100
,
160
,
160
,
NULL
,
NULL
,
NULL
,
NULL
);
hr
=
IDirectDraw_QueryInterface
(
lpDD
,
&
IID_IDirectDraw7
,
(
void
**
)
&
dd7
);
...
...
@@ -1253,6 +1253,14 @@ static void AttachmentTest7(void)
hr
=
IDirectDraw7_CreateSurface
(
dd7
,
&
ddsd
,
&
surface1
,
NULL
);
ok
(
hr
==
DD_OK
,
"CreateSurface returned: %x
\n
"
,
hr
);
/* backbuffer surfaces must not have dwBackBufferCount set */
ddsd2
.
dwSize
=
sizeof
(
ddsd2
);
hr
=
IDirectDrawSurface7_GetAttachedSurface
(
surface1
,
&
caps2
,
&
surface2
);
ok
(
hr
==
DD_OK
,
"GetAttachedSurface returned: %x
\n
"
,
hr
);
hr
=
IDirectDrawSurface7_GetSurfaceDesc
(
surface2
,
&
ddsd2
);
ok
(
hr
==
DD_OK
,
"GetSurfaceDesc returned: %x
\n
"
,
hr
);
ok
(
ddsd2
.
dwBackBufferCount
==
0
,
"backbuffer surface has dwBackBufferCount==%u
\n
"
,
ddsd2
.
dwBackBufferCount
);
num
=
0
;
IDirectDrawSurface7_EnumAttachedSurfaces
(
surface1
,
&
num
,
SurfaceCounter
);
ok
(
num
==
1
,
"Primary surface has %d surfaces attached, expected 1
\n
"
,
num
);
...
...
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