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
5ecd8903
Commit
5ecd8903
authored
Nov 04, 2002
by
Lionel Ulmer
Committed by
Alexandre Julliard
Nov 04, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- only compare the first WORD in the DDSCAPS2 structure if no DX7
- add some TRACEs
parent
f18aec26
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
11 deletions
+46
-11
main.c
dlls/ddraw/dsurface/main.c
+46
-11
No files found.
dlls/ddraw/dsurface/main.c
View file @
5ecd8903
...
...
@@ -40,6 +40,8 @@ Main_DirectDrawSurface_Construct(IDirectDrawSurfaceImpl *This,
IDirectDrawImpl
*
pDD
,
const
DDSURFACEDESC2
*
pDDSD
)
{
TRACE
(
"(%p)->(%p,%p)
\n
"
,
This
,
pDD
,
pDDSD
);
if
(
pDDSD
!=
&
This
->
surface_desc
)
{
This
->
surface_desc
.
dwSize
=
sizeof
(
This
->
surface_desc
);
DD_STRUCT_COPY_BYSIZE
(
&
(
This
->
surface_desc
),
pDDSD
);
...
...
@@ -112,11 +114,16 @@ ULONG WINAPI Main_DirectDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
{
ICOM_THIS
(
IDirectDrawSurfaceImpl
,
iface
);
TRACE
(
"(%p)->(): decreasing from %ld
\n
"
,
This
,
This
->
ref
);
if
(
--
This
->
ref
==
0
)
{
if
(
This
->
aux_release
)
This
->
aux_release
(
This
->
aux_ctx
,
This
->
aux_data
);
Main_DirectDrawSurface_Destroy
(
This
);
TRACE
(
"released surface %p
\n
"
,
This
);
return
0
;
}
...
...
@@ -127,6 +134,8 @@ ULONG WINAPI Main_DirectDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
{
ICOM_THIS
(
IDirectDrawSurfaceImpl
,
iface
);
TRACE
(
"(%p)->(): increasing from %ld
\n
"
,
This
,
This
->
ref
);
return
++
This
->
ref
;
}
...
...
@@ -586,19 +595,38 @@ Main_DirectDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
ICOM_THIS
(
IDirectDrawSurfaceImpl
,
iface
);
IDirectDrawSurfaceImpl
*
surf
;
IDirectDrawSurfaceImpl
*
found
=
NULL
;
DDSCAPS2
our_caps
;
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
"(%p)->Looking for caps: %lx,%lx,%lx,%lx output: %p
\n
"
,
This
,
pCaps
->
dwCaps
,
pCaps
->
dwCaps2
,
pCaps
->
dwCaps3
,
pCaps
->
dwCaps4
,
ppSurface
);
DPRINTF
(
" Caps are : "
);
DDRAW_dump_DDSCAPS
(
pCaps
);
DPRINTF
(
"
\n
"
);
}
TRACE
(
"(%p)->Looking for caps: %lx,%lx,%lx,%lx output: %p
\n
"
,
This
,
pCaps
->
dwCaps
,
pCaps
->
dwCaps2
,
pCaps
->
dwCaps3
,
pCaps
->
dwCaps4
,
ppSurface
);
our_caps
=
*
pCaps
;
if
((
This
->
ddraw_owner
->
local
.
dwLocalFlags
&
DDRAWILCL_DIRECTDRAW7
)
==
0
)
{
/* As this is not a DirectDraw7 application, remove the garbage that some games
put in the new fields of the DDSCAPS2 structure. */
our_caps
.
dwCaps2
=
0
;
our_caps
.
dwCaps3
=
0
;
our_caps
.
dwCaps4
=
0
;
if
(
TRACE_ON
(
ddraw
))
{
DPRINTF
(
" Real caps are : "
);
DDRAW_dump_DDSCAPS
(
&
our_caps
);
DPRINTF
(
"
\n
"
);
}
}
for
(
surf
=
This
->
attached
;
surf
!=
NULL
;
surf
=
surf
->
next_attached
)
{
TRACE
(
"Surface: (%p) caps: %lx,%lx,%lx,%lx
\n
"
,
surf
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps2
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps3
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps4
);
if
(((
surf
->
surface_desc
.
ddsCaps
.
dwCaps
&
pCaps
->
dwCaps
)
==
pCaps
->
dwCaps
)
&&
((
surf
->
surface_desc
.
ddsCaps
.
dwCaps2
&
pCaps
->
dwCaps2
)
==
pCaps
->
dwCaps2
))
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
"Surface: (%p) caps: %lx,%lx,%lx,%lx
\n
"
,
surf
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps2
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps3
,
surf
->
surface_desc
.
ddsCaps
.
dwCaps4
);
DPRINTF
(
" Surface caps are : "
);
DDRAW_dump_DDSCAPS
(
&
(
surf
->
surface_desc
.
ddsCaps
));
DPRINTF
(
"
\n
"
);
}
if
(((
surf
->
surface_desc
.
ddsCaps
.
dwCaps
&
our_caps
.
dwCaps
)
==
our_caps
.
dwCaps
)
&&
((
surf
->
surface_desc
.
ddsCaps
.
dwCaps2
&
our_caps
.
dwCaps2
)
==
our_caps
.
dwCaps2
))
{
/* MSDN: "This method fails if more than one surface is attached
* that matches the capabilities requested." */
...
...
@@ -614,11 +642,18 @@ Main_DirectDrawSurface_GetAttachedSurface(LPDIRECTDRAWSURFACE7 iface,
}
}
if
(
found
==
NULL
)
if
(
found
==
NULL
)
{
TRACE
(
"Did not find any valid surface
\n
"
);
return
DDERR_NOTFOUND
;
}
*
ppSurface
=
ICOM_INTERFACE
(
found
,
IDirectDrawSurface7
);
if
(
TRACE_ON
(
ddraw
))
{
TRACE
(
"Returning surface %p with description :
\n
"
,
*
ppSurface
);
DDRAW_dump_surface_desc
(
&
(
found
->
surface_desc
));
}
/* XXX d3dframe.cpp sometimes AddRefs things that it gets from us. */
IDirectDrawSurface7_AddRef
(
ICOM_INTERFACE
(
found
,
IDirectDrawSurface7
));
return
DD_OK
;
...
...
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