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
a843acef
Commit
a843acef
authored
Oct 10, 2011
by
Octavian Voicu
Committed by
Alexandre Julliard
Oct 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Be consistent about param and local var naming across AddAttachedSurface implementations.
parent
9cff895a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
surface.c
dlls/ddraw/surface.c
+13
-13
No files found.
dlls/ddraw/surface.c
View file @
a843acef
...
@@ -1426,29 +1426,29 @@ static HRESULT ddraw_surface_attach_surface(IDirectDrawSurfaceImpl *This, IDirec
...
@@ -1426,29 +1426,29 @@ static HRESULT ddraw_surface_attach_surface(IDirectDrawSurfaceImpl *This, IDirec
return
DD_OK
;
return
DD_OK
;
}
}
static
HRESULT
WINAPI
ddraw_surface7_AddAttachedSurface
(
IDirectDrawSurface7
*
iface
,
IDirectDrawSurface7
*
Attach
)
static
HRESULT
WINAPI
ddraw_surface7_AddAttachedSurface
(
IDirectDrawSurface7
*
iface
,
IDirectDrawSurface7
*
attachment
)
{
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
IDirectDrawSurfaceImpl
*
Surf
=
unsafe_impl_from_IDirectDrawSurface7
(
Attach
);
IDirectDrawSurfaceImpl
*
attachment_impl
=
unsafe_impl_from_IDirectDrawSurface7
(
attachment
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
Attach
);
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
/* Version 7 of this interface seems to refuse everything except z buffers, as per msdn */
/* Version 7 of this interface seems to refuse everything except z buffers, as per msdn */
if
(
!
(
Surf
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
))
if
(
!
(
attachment_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_ZBUFFER
))
{
{
WARN
(
"Application tries to attach a non Z buffer surface. caps %08x
\n
"
,
WARN
(
"Application tries to attach a non Z buffer surface. caps %08x
\n
"
,
Surf
->
surface_desc
.
ddsCaps
.
dwCaps
);
attachment_impl
->
surface_desc
.
ddsCaps
.
dwCaps
);
return
DDERR_CANNOTATTACHSURFACE
;
return
DDERR_CANNOTATTACHSURFACE
;
}
}
hr
=
ddraw_surface_attach_surface
(
This
,
Surf
);
hr
=
ddraw_surface_attach_surface
(
This
,
attachment_impl
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
return
hr
;
return
hr
;
}
}
ddraw_surface7_AddRef
(
Attach
);
ddraw_surface7_AddRef
(
attachment
);
return
hr
;
return
hr
;
}
}
...
@@ -1473,7 +1473,7 @@ static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *ifa
...
@@ -1473,7 +1473,7 @@ static HRESULT WINAPI ddraw_surface4_AddAttachedSurface(IDirectDrawSurface4 *ifa
static
HRESULT
WINAPI
ddraw_surface3_AddAttachedSurface
(
IDirectDrawSurface3
*
iface
,
IDirectDrawSurface3
*
attachment
)
static
HRESULT
WINAPI
ddraw_surface3_AddAttachedSurface
(
IDirectDrawSurface3
*
iface
,
IDirectDrawSurface3
*
attachment
)
{
{
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface3
(
iface
);
IDirectDrawSurfaceImpl
*
This
=
impl_from_IDirectDrawSurface3
(
iface
);
IDirectDrawSurfaceImpl
*
attach_impl
=
unsafe_impl_from_IDirectDrawSurface3
(
attachment
);
IDirectDrawSurfaceImpl
*
attach
ment
_impl
=
unsafe_impl_from_IDirectDrawSurface3
(
attachment
);
HRESULT
hr
;
HRESULT
hr
;
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
TRACE
(
"iface %p, attachment %p.
\n
"
,
iface
,
attachment
);
...
@@ -1484,11 +1484,11 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
...
@@ -1484,11 +1484,11 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
* -> primaries can be attached to offscreen plain surfaces
* -> primaries can be attached to offscreen plain surfaces
* -> z buffers can be attached to primaries */
* -> z buffers can be attached to primaries */
if
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_OFFSCREENPLAIN
)
if
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_OFFSCREENPLAIN
)
&&
attach_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_OFFSCREENPLAIN
))
&&
attach
ment
_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_OFFSCREENPLAIN
))
{
{
/* Sizes have to match */
/* Sizes have to match */
if
(
attach_impl
->
surface_desc
.
dwWidth
!=
This
->
surface_desc
.
dwWidth
if
(
attach
ment
_impl
->
surface_desc
.
dwWidth
!=
This
->
surface_desc
.
dwWidth
||
attach_impl
->
surface_desc
.
dwHeight
!=
This
->
surface_desc
.
dwHeight
)
||
attach
ment
_impl
->
surface_desc
.
dwHeight
!=
This
->
surface_desc
.
dwHeight
)
{
{
WARN
(
"Surface sizes do not match.
\n
"
);
WARN
(
"Surface sizes do not match.
\n
"
);
return
DDERR_CANNOTATTACHSURFACE
;
return
DDERR_CANNOTATTACHSURFACE
;
...
@@ -1496,7 +1496,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
...
@@ -1496,7 +1496,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
/* OK */
/* OK */
}
}
else
if
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_3DDEVICE
)
else
if
(
This
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_PRIMARYSURFACE
|
DDSCAPS_3DDEVICE
)
&&
attach_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_ZBUFFER
))
&&
attach
ment
_impl
->
surface_desc
.
ddsCaps
.
dwCaps
&
(
DDSCAPS_ZBUFFER
))
{
{
/* OK */
/* OK */
}
}
...
@@ -1506,7 +1506,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
...
@@ -1506,7 +1506,7 @@ static HRESULT WINAPI ddraw_surface3_AddAttachedSurface(IDirectDrawSurface3 *ifa
return
DDERR_CANNOTATTACHSURFACE
;
return
DDERR_CANNOTATTACHSURFACE
;
}
}
hr
=
ddraw_surface_attach_surface
(
This
,
attach_impl
);
hr
=
ddraw_surface_attach_surface
(
This
,
attach
ment
_impl
);
if
(
FAILED
(
hr
))
if
(
FAILED
(
hr
))
{
{
return
hr
;
return
hr
;
...
...
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