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
f7ee96c3
Commit
f7ee96c3
authored
Jan 09, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Don't propagate color key changes to attached surfaces.
parent
4710c4b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
57 deletions
+4
-57
surface.c
dlls/ddraw/surface.c
+4
-57
No files found.
dlls/ddraw/surface.c
View file @
f7ee96c3
...
@@ -4494,60 +4494,11 @@ static HRESULT WINAPI ddraw_surface1_GetPalette(IDirectDrawSurface *iface, IDire
...
@@ -4494,60 +4494,11 @@ static HRESULT WINAPI ddraw_surface1_GetPalette(IDirectDrawSurface *iface, IDire
return
ddraw_surface7_GetPalette
(
&
surface
->
IDirectDrawSurface7_iface
,
palette
);
return
ddraw_surface7_GetPalette
(
&
surface
->
IDirectDrawSurface7_iface
,
palette
);
}
}
/*****************************************************************************
* SetColorKeyEnum
*
* EnumAttachedSurface callback for SetColorKey. Used to set color keys
* recursively in the surface tree
*
*****************************************************************************/
struct
SCKContext
{
HRESULT
ret
;
struct
wined3d_color_key
*
color_key
;
DWORD
Flags
;
};
static
HRESULT
WINAPI
SetColorKeyEnum
(
IDirectDrawSurface7
*
surface
,
DDSURFACEDESC2
*
desc
,
void
*
context
)
{
struct
ddraw_surface
*
surface_impl
=
impl_from_IDirectDrawSurface7
(
surface
);
struct
SCKContext
*
ctx
=
context
;
HRESULT
hr
;
hr
=
wined3d_surface_set_color_key
(
surface_impl
->
wined3d_surface
,
ctx
->
Flags
,
ctx
->
color_key
);
if
(
FAILED
(
hr
))
{
WARN
(
"IWineD3DSurface_SetColorKey failed, hr = %08x
\n
"
,
hr
);
ctx
->
ret
=
hr
;
}
ddraw_surface7_EnumAttachedSurfaces
(
surface
,
context
,
SetColorKeyEnum
);
ddraw_surface7_Release
(
surface
);
return
DDENUMRET_OK
;
}
/*****************************************************************************
* IDirectDrawSurface7::SetColorKey
*
* Sets the color keying options for the surface. Observations showed that
* in case of complex surfaces the color key has to be assigned to all
* sublevels.
*
* Params:
* Flags: DDCKEY_*
* CKey: The new color key
*
* Returns:
* DD_OK on success
* See IWineD3DSurface::SetColorKey for details
*
*****************************************************************************/
static
HRESULT
WINAPI
ddraw_surface7_SetColorKey
(
IDirectDrawSurface7
*
iface
,
DWORD
Flags
,
DDCOLORKEY
*
CKey
)
static
HRESULT
WINAPI
ddraw_surface7_SetColorKey
(
IDirectDrawSurface7
*
iface
,
DWORD
Flags
,
DDCOLORKEY
*
CKey
)
{
{
struct
ddraw_surface
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
struct
ddraw_surface
*
This
=
impl_from_IDirectDrawSurface7
(
iface
);
HRESULT
hr
=
WINED3D_OK
;
DDCOLORKEY
FixedCKey
;
DDCOLORKEY
FixedCKey
;
struct
SCKContext
ctx
=
{
DD_OK
,
(
struct
wined3d_color_key
*
)(
CKey
?
&
FixedCKey
:
NULL
),
Flags
};
TRACE
(
"iface %p, flags %#x, color_key %p.
\n
"
,
iface
,
Flags
,
CKey
);
TRACE
(
"iface %p, flags %#x, color_key %p.
\n
"
,
iface
,
Flags
,
CKey
);
...
@@ -4612,15 +4563,11 @@ static HRESULT WINAPI ddraw_surface7_SetColorKey(IDirectDrawSurface7 *iface, DWO
...
@@ -4612,15 +4563,11 @@ static HRESULT WINAPI ddraw_surface7_SetColorKey(IDirectDrawSurface7 *iface, DWO
}
}
}
}
if
(
This
->
wined3d_texture
)
if
(
This
->
wined3d_texture
)
ctx
.
ret
=
wined3d_texture_set_color_key
(
This
->
wined3d_texture
,
Flags
,
ctx
.
color_key
);
hr
=
wined3d_texture_set_color_key
(
This
->
wined3d_texture
,
Flags
,
ddraw_surface7_EnumAttachedSurfaces
(
iface
,
&
ctx
,
SetColorKeyEnum
);
CKey
?
(
struct
wined3d_color_key
*
)
&
FixedCKey
:
NULL
);
wined3d_mutex_unlock
();
wined3d_mutex_unlock
();
switch
(
ctx
.
ret
)
return
hr_ddraw_from_wined3d
(
hr
);
{
case
WINED3DERR_INVALIDCALL
:
return
DDERR_INVALIDPARAMS
;
default:
return
ctx
.
ret
;
}
}
}
static
HRESULT
WINAPI
ddraw_surface4_SetColorKey
(
IDirectDrawSurface4
*
iface
,
DWORD
flags
,
DDCOLORKEY
*
color_key
)
static
HRESULT
WINAPI
ddraw_surface4_SetColorKey
(
IDirectDrawSurface4
*
iface
,
DWORD
flags
,
DDCOLORKEY
*
color_key
)
...
...
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