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
de051649
Commit
de051649
authored
Jul 23, 2006
by
Kovács András
Committed by
Alexandre Julliard
Jul 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix CopyRects if pDestPointsArray is NULL.
parent
334a0719
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
device.c
dlls/wined3d/device.c
+32
-2
No files found.
dlls/wined3d/device.c
View file @
de051649
...
...
@@ -6781,8 +6781,38 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CopyRects(IWineD3DDevice *iface,
TRACE
(
"Unlocked src and dst
\n
"
);
}
}
else
{
FIXME
(
"Wanted to copy partial surfaces not implemented, returning WINED3DERR_INVALIDCALL
\n
"
);
hr
=
WINED3DERR_INVALIDCALL
;
unsigned
int
i
;
int
bytesPerPixel
=
((
IWineD3DSurfaceImpl
*
)
pSourceSurface
)
->
bytesPerPixel
;
int
copyperline
;
int
j
;
WINED3DLOCKED_RECT
lrSrc
;
WINED3DLOCKED_RECT
lrDst
;
RECT
dest_rect
;
for
(
i
=
0
;
i
<
cRects
;
i
++
)
{
CONST
RECT
*
r
=
&
pSourceRectsArray
[
i
];
TRACE
(
"Copying rect %d (%ld,%ld),(%ld,%ld) -> (0, 0)
\n
"
,
i
,
r
->
left
,
r
->
top
,
r
->
right
,
r
->
bottom
);
if
(
srcFormat
==
WINED3DFMT_DXT1
)
{
copyperline
=
((
r
->
right
-
r
->
left
)
*
bytesPerPixel
)
/
2
;
/* DXT1 is half byte per pixel */
}
else
{
copyperline
=
((
r
->
right
-
r
->
left
)
*
bytesPerPixel
);
}
IWineD3DSurface_LockRect
(
pSourceSurface
,
&
lrSrc
,
r
,
WINED3DLOCK_READONLY
);
dest_rect
.
left
=
0
;
dest_rect
.
top
=
0
;
dest_rect
.
right
=
r
->
right
-
r
->
left
;
dest_rect
.
bottom
=
r
->
bottom
-
r
->
top
;
IWineD3DSurface_LockRect
(
pDestinationSurface
,
&
lrDst
,
&
dest_rect
,
0L
);
TRACE
(
"Locked src and dst
\n
"
);
/* Find where to start */
for
(
j
=
0
;
j
<
(
r
->
bottom
-
r
->
top
-
1
);
++
j
)
{
memcpy
((
char
*
)
lrDst
.
pBits
+
(
j
*
lrDst
.
Pitch
),
(
char
*
)
lrSrc
.
pBits
+
(
j
*
lrSrc
.
Pitch
),
copyperline
);
}
IWineD3DSurface_UnlockRect
(
pSourceSurface
);
IWineD3DSurface_UnlockRect
(
pDestinationSurface
);
TRACE
(
"Unlocked src and dst
\n
"
);
}
}
}
...
...
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