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
4905773b
Commit
4905773b
authored
May 24, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
May 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Only initially enable color keying for version 1 devices.
parent
23440d91
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
device.c
dlls/ddraw/device.c
+2
-0
executebuffer.c
dlls/ddraw/executebuffer.c
+1
-5
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+4
-4
No files found.
dlls/ddraw/device.c
View file @
4905773b
...
...
@@ -6646,6 +6646,8 @@ static HRESULT d3d_device_init(struct d3d_device *device, struct ddraw *ddraw,
wined3d_device_set_render_state
(
ddraw
->
wined3d_device
,
WINED3D_RS_ZENABLE
,
d3d_device_update_depth_stencil
(
device
));
if
(
version
==
1
)
/* Color keying is initially enabled for version 1 devices. */
wined3d_device_set_render_state
(
ddraw
->
wined3d_device
,
WINED3D_RS_COLORKEYENABLE
,
TRUE
);
return
D3D_OK
;
}
...
...
dlls/ddraw/executebuffer.c
View file @
4905773b
...
...
@@ -131,11 +131,7 @@ HRESULT d3d_execute_buffer_execute(struct d3d_execute_buffer *buffer,
buffer
->
indices
[(
i
*
3
)
+
1
]
=
ci
->
u2
.
v2
;
buffer
->
indices
[(
i
*
3
)
+
2
]
=
ci
->
u3
.
v3
;
instr
+=
size
;
}
/* IDirect3DDevices have color keying always enabled -
* enable it before drawing. This overwrites any ALPHA*
* render state. */
wined3d_device_set_render_state
(
device
->
wined3d_device
,
WINED3D_RS_COLORKEYENABLE
,
1
);
}
IDirect3DDevice7_DrawIndexedPrimitive
(
&
device
->
IDirect3DDevice7_iface
,
D3DPT_TRIANGLELIST
,
D3DFVF_TLVERTEX
,
tl_vx
,
0
,
buffer
->
indices
,
count
*
3
,
0
);
}
break
;
...
...
dlls/ddraw/tests/ddraw1.c
View file @
4905773b
...
...
@@ -1244,7 +1244,7 @@ static void test_ck_rgba(void)
ok
(
SUCCEEDED
(
hr
),
"Failed to end scene, hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
||
i
==
3
)
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result1
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result1
,
i
,
color
);
else
...
...
@@ -1266,7 +1266,7 @@ static void test_ck_rgba(void)
/* This tests that fragments that are masked out by the color key are
* discarded, instead of just fully transparent. */
color
=
get_surface_color
(
rt
,
320
,
240
);
if
(
i
==
2
||
i
==
3
)
if
(
i
==
2
)
todo_wine
ok
(
compare_color
(
color
,
tests
[
i
].
result2
,
1
),
"Expected color 0x%08x for test %u, got 0x%08x.
\n
"
,
tests
[
i
].
result2
,
i
,
color
);
else
...
...
@@ -1427,7 +1427,7 @@ static void test_ck_default(void)
hr
=
IDirect3DDevice_EndScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to end scene, hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
rt
,
320
,
240
);
todo_wine
ok
(
compare_color
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
ok
(
compare_color
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DViewport_Clear
(
viewport
,
1
,
&
clear_rect
,
D3DCLEAR_TARGET
);
ok
(
SUCCEEDED
(
hr
),
"Failed to clear viewport, hr %#x.
\n
"
,
hr
);
...
...
@@ -1439,7 +1439,7 @@ static void test_ck_default(void)
hr
=
IDirect3DDevice_EndScene
(
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to end scene, hr %#x.
\n
"
,
hr
);
color
=
get_surface_color
(
rt
,
320
,
240
);
todo_wine
ok
(
compare_color
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
ok
(
compare_color
(
color
,
0x000000ff
,
1
),
"Got unexpected color 0x%08x.
\n
"
,
color
);
hr
=
IDirect3DViewport_Clear
(
viewport
,
1
,
&
clear_rect
,
D3DCLEAR_TARGET
);
ok
(
SUCCEEDED
(
hr
),
"Failed to clear viewport, hr %#x.
\n
"
,
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