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
c53487b5
Commit
c53487b5
authored
Sep 03, 2007
by
David Hedberg
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Fix and test case for situation where DDSD_MIPMAPCOUNT is set and dwMipMapCount is 0.
parent
2456473d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
1 deletion
+25
-1
ddraw.c
dlls/ddraw/ddraw.c
+6
-1
dsurface.c
dlls/ddraw/tests/dsurface.c
+19
-0
No files found.
dlls/ddraw/ddraw.c
View file @
c53487b5
...
...
@@ -2417,7 +2417,12 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
{
if
(
desc2
.
dwFlags
&
DDSD_MIPMAPCOUNT
)
{
/* Mipmap count is given, nothing to do */
/* Mipmap count is given, should not be 0 */
if
(
desc2
.
u2
.
dwMipMapCount
==
0
)
{
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_INVALIDPARAMS
;
}
}
else
{
...
...
dlls/ddraw/tests/dsurface.c
View file @
c53487b5
...
...
@@ -183,6 +183,25 @@ static void MipMapCreationTest(void)
/* Destroy the surface. */
IDirectDrawSurface_Release
(
lpDDSMipMapTest
);
/* Fifth mipmap creation test: try to create a surface with
DDSCAPS_COMPLEX, DDSCAPS_MIPMAP, DDSD_MIPMAPCOUNT,
where dwMipMapCount = 0. This should fail. */
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_MIPMAPCOUNT
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_TEXTURE
|
DDSCAPS_COMPLEX
|
DDSCAPS_MIPMAP
;
U2
(
ddsd
).
dwMipMapCount
=
0
;
ddsd
.
dwWidth
=
128
;
ddsd
.
dwHeight
=
32
;
rc
=
IDirectDraw_CreateSurface
(
lpDD
,
&
ddsd
,
&
lpDDSMipMapTest
,
NULL
);
ok
(
rc
==
DDERR_INVALIDPARAMS
,
"CreateSurface returned: %x
\n
"
,
rc
);
/* Destroy the surface. */
if
(
rc
==
DD_OK
)
IDirectDrawSurface_Release
(
lpDDSMipMapTest
);
}
static
void
SrcColorKey32BlitTest
(
void
)
...
...
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