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
6b415013
Commit
6b415013
authored
Apr 24, 2017
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 25, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Ignore unsupported blit flags.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
45b01908
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
11 deletions
+29
-11
surface.c
dlls/ddraw/surface.c
+21
-3
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+2
-2
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+2
-2
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+2
-2
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+2
-2
No files found.
dlls/ddraw/surface.c
View file @
6b415013
...
...
@@ -1570,6 +1570,7 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
struct
ddraw_surface
*
dst_impl
=
impl_from_IDirectDrawSurface7
(
iface
);
struct
ddraw_surface
*
src_impl
=
unsafe_impl_from_IDirectDrawSurface7
(
src_surface
);
struct
wined3d_blt_fx
wined3d_fx
;
DWORD
unsupported_flags
;
DWORD
fill_colour
=
0
;
HRESULT
hr
=
DD_OK
;
DDBLTFX
rop_fx
;
...
...
@@ -1577,9 +1578,26 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH ddraw_surface7_Blt(IDirectDrawSurface7 *
TRACE
(
"iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.
\n
"
,
iface
,
wine_dbgstr_rect
(
dst_rect
),
src_surface
,
wine_dbgstr_rect
(
src_rect
),
flags
,
fx
);
/* Check for validity of the flags here. WineD3D Has the software-opengl selection path and would have
* to check at 2 places, and sometimes do double checks. This also saves the call to wined3d :-)
*/
unsupported_flags
=
DDBLT_ALPHADEST
|
DDBLT_ALPHADESTCONSTOVERRIDE
|
DDBLT_ALPHADESTNEG
|
DDBLT_ALPHADESTSURFACEOVERRIDE
|
DDBLT_ALPHAEDGEBLEND
|
DDBLT_ALPHASRC
|
DDBLT_ALPHASRCCONSTOVERRIDE
|
DDBLT_ALPHASRCNEG
|
DDBLT_ALPHASRCSURFACEOVERRIDE
|
DDBLT_ZBUFFER
|
DDBLT_ZBUFFERDESTCONSTOVERRIDE
|
DDBLT_ZBUFFERDESTOVERRIDE
|
DDBLT_ZBUFFERSRCCONSTOVERRIDE
|
DDBLT_ZBUFFERSRCOVERRIDE
;
if
(
flags
&
unsupported_flags
)
{
WARN
(
"Ignoring unsupported flags %#x.
\n
"
,
flags
&
unsupported_flags
);
flags
&=
~
unsupported_flags
;
}
if
((
flags
&
DDBLT_KEYSRCOVERRIDE
)
&&
(
!
fx
||
flags
&
DDBLT_KEYSRC
))
{
WARN
(
"Invalid source color key parameters, returning DDERR_INVALIDPARAMS
\n
"
);
...
...
dlls/ddraw/tests/ddraw1.c
View file @
6b415013
...
...
@@ -8959,10 +8959,10 @@ static void test_blt_z_alpha(void)
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
src_surface
,
NULL
,
blt_flags
[
i
]
|
DDBLT_WAIT
,
&
fx
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
color
=
get_surface_color
(
dst_surface
,
32
,
32
);
todo_wine
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
}
IDirectDrawSurface_Release
(
dst_surface
);
...
...
dlls/ddraw/tests/ddraw2.c
View file @
6b415013
...
...
@@ -10047,10 +10047,10 @@ static void test_blt_z_alpha(void)
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
src_surface
,
NULL
,
blt_flags
[
i
]
|
DDBLT_WAIT
,
&
fx
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
color
=
get_surface_color
(
dst_surface
,
32
,
32
);
todo_wine
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
}
IDirectDrawSurface_Release
(
dst_surface
);
...
...
dlls/ddraw/tests/ddraw4.c
View file @
6b415013
...
...
@@ -11159,10 +11159,10 @@ static void test_blt_z_alpha(void)
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
hr
=
IDirectDrawSurface4_Blt
(
dst_surface
,
NULL
,
src_surface
,
NULL
,
blt_flags
[
i
]
|
DDBLT_WAIT
,
&
fx
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
color
=
get_surface_color
(
dst_surface
,
32
,
32
);
todo_wine
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
}
IDirectDrawSurface4_Release
(
dst_surface
);
...
...
dlls/ddraw/tests/ddraw7.c
View file @
6b415013
...
...
@@ -11485,10 +11485,10 @@ static void test_blt_z_alpha(void)
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
hr
=
IDirectDrawSurface7_Blt
(
dst_surface
,
NULL
,
src_surface
,
NULL
,
blt_flags
[
i
]
|
DDBLT_WAIT
,
&
fx
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Test %u: Got unexpected hr %#x.
\n
"
,
i
,
hr
);
color
=
get_surface_color
(
dst_surface
,
32
,
32
);
todo_wine
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
ok
(
compare_color
(
color
,
0x0000ff00
,
0
),
"Test %u: Got unexpected color 0x%08x.
\n
"
,
i
,
color
);
}
IDirectDrawSurface7_Release
(
dst_surface
);
...
...
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