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
eeefed3d
Commit
eeefed3d
authored
Oct 28, 2013
by
Lasse Rasinen
Committed by
Alexandre Julliard
Oct 28, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Update locked_rect only if wined3d_surface_map succeeds.
parent
c25c0198
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
surface.c
dlls/d3d9/surface.c
+5
-2
device.c
dlls/d3d9/tests/device.c
+5
-0
No files found.
dlls/d3d9/surface.c
View file @
eeefed3d
...
...
@@ -293,8 +293,11 @@ static HRESULT WINAPI d3d9_surface_LockRect(IDirect3DSurface9 *iface,
hr
=
wined3d_surface_map
(
surface
->
wined3d_surface
,
&
map_desc
,
rect
,
flags
);
wined3d_mutex_unlock
();
locked_rect
->
Pitch
=
map_desc
.
row_pitch
;
locked_rect
->
pBits
=
map_desc
.
data
;
if
(
SUCCEEDED
(
hr
))
{
locked_rect
->
Pitch
=
map_desc
.
row_pitch
;
locked_rect
->
pBits
=
map_desc
.
data
;
}
return
hr
;
}
...
...
dlls/d3d9/tests/device.c
View file @
eeefed3d
...
...
@@ -5402,8 +5402,13 @@ static void test_lockrect_invalid(void)
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
locked_rect
,
NULL
,
0
);
ok
(
SUCCEEDED
(
hr
),
"Failed to lock surface with rect NULL, hr %#x.
\n
"
,
hr
);
locked_rect
.
pBits
=
(
BYTE
*
)
0xdeadbeef
;
locked_rect
.
Pitch
=
1
;
hr
=
IDirect3DSurface9_LockRect
(
surface
,
&
locked_rect
,
NULL
,
0
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
locked_rect
.
pBits
==
(
BYTE
*
)
0xdeadbeef
,
"Got unexpected pBits: %p
\n
"
,
locked_rect
.
pBits
);
ok
(
locked_rect
.
Pitch
==
1
,
"Got unexpected pitch %d
\n
"
,
locked_rect
.
Pitch
);
hr
=
IDirect3DSurface9_UnlockRect
(
surface
);
ok
(
SUCCEEDED
(
hr
),
"Failed to unlock surface, 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