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
3a06ade1
Commit
3a06ade1
authored
Apr 11, 2016
by
Henri Verbeet
Committed by
Alexandre Julliard
Apr 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Use the texture dimension helpers in wined3d_surface_blt().
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
8c30612d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
surface.c
dlls/wined3d/surface.c
+13
-8
No files found.
dlls/wined3d/surface.c
View file @
3a06ade1
...
...
@@ -4168,6 +4168,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
struct
wined3d_device
*
device
=
dst_texture
->
resource
.
device
;
struct
wined3d_swapchain
*
src_swapchain
,
*
dst_swapchain
;
struct
wined3d_texture
*
src_texture
=
NULL
;
unsigned
int
dst_w
,
dst_h
,
src_w
,
src_h
;
unsigned
int
src_sub_resource_idx
=
0
;
DWORD
src_ds_flags
,
dst_ds_flags
;
BOOL
scale
,
convert
;
...
...
@@ -4211,11 +4212,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
return
WINEDDERR_SURFACEBUSY
;
}
dst_w
=
wined3d_texture_get_level_width
(
dst_texture
,
dst_surface
->
texture_level
);
dst_h
=
wined3d_texture_get_level_height
(
dst_texture
,
dst_surface
->
texture_level
);
if
(
dst_rect
->
left
>=
dst_rect
->
right
||
dst_rect
->
top
>=
dst_rect
->
bottom
||
dst_rect
->
left
>
dst_
surface
->
resource
.
width
||
dst_rect
->
left
<
0
||
dst_rect
->
top
>
dst_
surface
->
resource
.
height
||
dst_rect
->
top
<
0
||
dst_rect
->
right
>
dst_
surface
->
resource
.
width
||
dst_rect
->
right
<
0
||
dst_rect
->
bottom
>
dst_
surface
->
resource
.
height
||
dst_rect
->
bottom
<
0
)
||
dst_rect
->
left
>
dst_
w
||
dst_rect
->
left
<
0
||
dst_rect
->
top
>
dst_
h
||
dst_rect
->
top
<
0
||
dst_rect
->
right
>
dst_
w
||
dst_rect
->
right
<
0
||
dst_rect
->
bottom
>
dst_
h
||
dst_rect
->
bottom
<
0
)
{
WARN
(
"The application gave us a bad destination rectangle.
\n
"
);
return
WINEDDERR_INVALIDRECT
;
...
...
@@ -4223,11 +4226,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst
if
(
src_texture
)
{
src_w
=
wined3d_texture_get_level_width
(
src_texture
,
src_surface
->
texture_level
);
src_h
=
wined3d_texture_get_level_height
(
src_texture
,
src_surface
->
texture_level
);
if
(
src_rect
->
left
>=
src_rect
->
right
||
src_rect
->
top
>=
src_rect
->
bottom
||
src_rect
->
left
>
src_
surface
->
resource
.
width
||
src_rect
->
left
<
0
||
src_rect
->
top
>
src_
surface
->
resource
.
height
||
src_rect
->
top
<
0
||
src_rect
->
right
>
src_
surface
->
resource
.
width
||
src_rect
->
right
<
0
||
src_rect
->
bottom
>
src_
surface
->
resource
.
height
||
src_rect
->
bottom
<
0
)
||
src_rect
->
left
>
src_
w
||
src_rect
->
left
<
0
||
src_rect
->
top
>
src_
h
||
src_rect
->
top
<
0
||
src_rect
->
right
>
src_
w
||
src_rect
->
right
<
0
||
src_rect
->
bottom
>
src_
h
||
src_rect
->
bottom
<
0
)
{
WARN
(
"The application gave us a bad source rectangle.
\n
"
);
return
WINEDDERR_INVALIDRECT
;
...
...
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