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
ae4e8244
Commit
ae4e8244
authored
Jan 09, 2009
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jan 09, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw[ex]: Show a caps handling difference.
parent
60039a5b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
0 deletions
+42
-0
ddraw.c
dlls/ddraw/ddraw.c
+11
-0
dsurface.c
dlls/ddraw/tests/dsurface.c
+10
-0
surface.c
dlls/ddrawex/tests/surface.c
+21
-0
No files found.
dlls/ddraw/ddraw.c
View file @
ae4e8244
...
...
@@ -2432,6 +2432,7 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
LONG
extra_surfaces
=
0
;
DDSURFACEDESC2
desc2
;
WINED3DDISPLAYMODE
Mode
;
const
DWORD
sysvidmem
=
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
;
TRACE
(
"(%p)->(%p,%p,%p)
\n
"
,
This
,
DDSD
,
Surf
,
UnkOuter
);
...
...
@@ -2490,6 +2491,16 @@ IDirectDrawImpl_CreateSurface(IDirectDraw7 *iface,
LeaveCriticalSection
(
&
ddraw_cs
);
return
DDERR_INVALIDCAPS
;
}
if
((
DDSD
->
ddsCaps
.
dwCaps
&
sysvidmem
)
==
sysvidmem
)
{
/* This is a special switch in ddrawex.dll, but not allowed in ddraw.dll */
WARN
(
"Application tries to put the surface in both system and video memory
\n
"
);
LeaveCriticalSection
(
&
ddraw_cs
);
*
Surf
=
NULL
;
return
DDERR_INVALIDCAPS
;
}
/* Check cube maps but only if the size includes them */
if
(
DDSD
->
dwSize
>=
sizeof
(
DDSURFACEDESC2
))
{
...
...
dlls/ddraw/tests/dsurface.c
View file @
ae4e8244
...
...
@@ -2746,6 +2746,16 @@ static void SurfaceCapsTest(void)
IDirectDraw7_Release
(
dd7
);
}
memset
(
&
create
,
0
,
sizeof
(
create
));
create
.
dwSize
=
sizeof
(
create
);
create
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
;
create
.
ddsCaps
.
dwCaps
=
DDSCAPS_SYSTEMMEMORY
|
DDSCAPS_VIDEOMEMORY
;
create
.
dwWidth
=
64
;
create
.
dwHeight
=
64
;
hr
=
IDirectDraw_CreateSurface
(
lpDD
,
&
create
,
&
surface1
,
NULL
);
ok
(
hr
==
DDERR_INVALIDCAPS
,
"Creating a SYSMEM | VIDMEM surface returned 0x%08x, expected DDERR_INVALIDCAPS
\n
"
,
hr
);
if
(
surface1
)
IDirectDrawSurface_Release
(
surface1
);
}
static
BOOL
can_create_primary_surface
(
void
)
...
...
dlls/ddrawex/tests/surface.c
View file @
ae4e8244
...
...
@@ -147,6 +147,26 @@ static void GetDCTest(void)
IDirectDraw_Release
(
dd1
);
}
static
void
CapsTest
(
void
)
{
DDSURFACEDESC
ddsd
;
IDirectDraw
*
dd1
=
createDD
();
IDirectDrawSurface
*
surf
;
HRESULT
hr
;
memset
(
&
ddsd
,
0
,
sizeof
(
ddsd
));
ddsd
.
dwSize
=
sizeof
(
ddsd
);
ddsd
.
dwFlags
=
DDSD_CAPS
|
DDSD_WIDTH
|
DDSD_HEIGHT
;
ddsd
.
ddsCaps
.
dwCaps
=
DDSCAPS_SYSTEMMEMORY
|
DDSCAPS_VIDEOMEMORY
;
ddsd
.
dwWidth
=
64
;
ddsd
.
dwHeight
=
64
;
hr
=
IDirectDraw_CreateSurface
(
dd1
,
&
ddsd
,
&
surf
,
NULL
);
todo_wine
ok
(
hr
==
DD_OK
,
"Creating a SYSMEM | VIDMEM surface returned 0x%08x, expected DD_OK
\n
"
,
hr
);
if
(
surf
)
IDirectDrawSurface_Release
(
surf
);
IDirectDraw_Release
(
dd1
);
}
START_TEST
(
surface
)
{
IClassFactory
*
classfactory
=
NULL
;
...
...
@@ -169,6 +189,7 @@ START_TEST(surface)
ok
(
hr
==
S_OK
,
"Failed to create a IDirectDrawFactory
\n
"
);
GetDCTest
();
CapsTest
();
if
(
factory
)
{
ref
=
IDirectDrawFactory_Release
(
factory
);
...
...
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