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
31f31208
Commit
31f31208
authored
Jan 06, 2012
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 06, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Convert to integer before adjusting the clipped source rect.
This makes a difference for the bottom and right edges, and we could end up with an empty source rectangle otherwise.
parent
f17e7148
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
32 deletions
+16
-32
surface.c
dlls/ddraw/surface.c
+4
-4
ddraw1.c
dlls/ddraw/tests/ddraw1.c
+3
-7
ddraw2.c
dlls/ddraw/tests/ddraw2.c
+3
-7
ddraw4.c
dlls/ddraw/tests/ddraw4.c
+3
-7
ddraw7.c
dlls/ddraw/tests/ddraw7.c
+3
-7
No files found.
dlls/ddraw/surface.c
View file @
31f31208
...
...
@@ -1361,10 +1361,10 @@ static HRESULT ddraw_surface_blt_clipped(IDirectDrawSurfaceImpl *dst_surface, co
if
(
src_surface
)
{
src_rect_clipped
.
left
+=
(
clip_rect
[
i
].
left
-
dst_rect
.
left
)
*
scale_x
;
src_rect_clipped
.
top
+=
(
clip_rect
[
i
].
top
-
dst_rect
.
top
)
*
scale_y
;
src_rect_clipped
.
right
-=
(
dst_rect
.
right
-
clip_rect
[
i
].
right
)
*
scale_x
;
src_rect_clipped
.
bottom
-=
(
dst_rect
.
bottom
-
clip_rect
[
i
].
bottom
)
*
scale_y
;
src_rect_clipped
.
left
+=
(
LONG
)((
clip_rect
[
i
].
left
-
dst_rect
.
left
)
*
scale_x
)
;
src_rect_clipped
.
top
+=
(
LONG
)((
clip_rect
[
i
].
top
-
dst_rect
.
top
)
*
scale_y
)
;
src_rect_clipped
.
right
-=
(
LONG
)((
dst_rect
.
right
-
clip_rect
[
i
].
right
)
*
scale_x
)
;
src_rect_clipped
.
bottom
-=
(
LONG
)((
dst_rect
.
bottom
-
clip_rect
[
i
].
bottom
)
*
scale_y
)
;
if
(
src_surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_FRONTBUFFER
)
{
...
...
dlls/ddraw/tests/ddraw1.c
View file @
31f31208
...
...
@@ -297,7 +297,7 @@ static void test_clipper_blt(void)
SetRect
(
&
src_rect
,
0
,
0
,
4
,
1
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
src_surface
,
&
src_rect
,
DDBLT_WAIT
,
NULL
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
for
(
j
=
0
;
j
<
4
;
++
j
)
...
...
@@ -305,12 +305,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
if
((
i
<
2
&&
j
<
2
)
||
(
i
>=
2
&&
j
>=
2
))
todo_wine
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
else
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw2.c
View file @
31f31208
...
...
@@ -304,7 +304,7 @@ static void test_clipper_blt(void)
SetRect
(
&
src_rect
,
0
,
0
,
4
,
1
);
hr
=
IDirectDrawSurface_Blt
(
dst_surface
,
NULL
,
src_surface
,
&
src_rect
,
DDBLT_WAIT
,
NULL
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
for
(
j
=
0
;
j
<
4
;
++
j
)
...
...
@@ -312,12 +312,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
if
((
i
<
2
&&
j
<
2
)
||
(
i
>=
2
&&
j
>=
2
))
todo_wine
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
else
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw4.c
View file @
31f31208
...
...
@@ -599,7 +599,7 @@ static void test_clipper_blt(void)
SetRect
(
&
src_rect
,
0
,
0
,
4
,
1
);
hr
=
IDirectDrawSurface4_Blt
(
dst_surface
,
NULL
,
src_surface
,
&
src_rect
,
DDBLT_WAIT
,
NULL
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
for
(
j
=
0
;
j
<
4
;
++
j
)
...
...
@@ -607,12 +607,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
if
((
i
<
2
&&
j
<
2
)
||
(
i
>=
2
&&
j
>=
2
))
todo_wine
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
else
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
dlls/ddraw/tests/ddraw7.c
View file @
31f31208
...
...
@@ -592,7 +592,7 @@ static void test_clipper_blt(void)
SetRect
(
&
src_rect
,
0
,
0
,
4
,
1
);
hr
=
IDirectDrawSurface7_Blt
(
dst_surface
,
NULL
,
src_surface
,
&
src_rect
,
DDBLT_WAIT
,
NULL
);
todo_wine
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
ok
(
SUCCEEDED
(
hr
),
"Failed to blit, hr %#x.
\n
"
,
hr
);
for
(
i
=
0
;
i
<
4
;
++
i
)
{
for
(
j
=
0
;
j
<
4
;
++
j
)
...
...
@@ -600,12 +600,8 @@ static void test_clipper_blt(void)
x
=
80
*
((
2
*
j
)
+
1
);
y
=
60
*
((
2
*
i
)
+
1
);
color
=
get_surface_color
(
dst_surface
,
x
,
y
);
if
((
i
<
2
&&
j
<
2
)
||
(
i
>=
2
&&
j
>=
2
))
todo_wine
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
else
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
ok
(
compare_color
(
color
,
expected1
[
i
*
4
+
j
],
1
),
"Expected color 0x%08x at %u,%u, got 0x%08x.
\n
"
,
expected1
[
i
*
4
+
j
],
x
,
y
,
color
);
}
}
...
...
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