Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
ee7eee55
Commit
ee7eee55
authored
Jun 30, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 30, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Check the device status in present calls.
parent
85c203ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
2 deletions
+9
-2
device.c
dlls/d3d8/device.c
+3
-0
swapchain.c
dlls/d3d8/swapchain.c
+4
-0
device.c
dlls/d3d8/tests/device.c
+2
-2
No files found.
dlls/d3d8/device.c
View file @
ee7eee55
...
...
@@ -661,6 +661,9 @@ static HRESULT WINAPI d3d8_device_Present(IDirect3DDevice8 *iface, const RECT *s
TRACE
(
"iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.
\n
"
,
iface
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
);
if
(
device
->
device_state
!=
D3D8_DEVICE_STATE_OK
)
return
D3DERR_DEVICELOST
;
wined3d_mutex_lock
();
hr
=
wined3d_device_present
(
device
->
wined3d_device
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
0
);
...
...
dlls/d3d8/swapchain.c
View file @
ee7eee55
...
...
@@ -91,11 +91,15 @@ static HRESULT WINAPI d3d8_swapchain_Present(IDirect3DSwapChain8 *iface,
const
RGNDATA
*
dirty_region
)
{
struct
d3d8_swapchain
*
swapchain
=
impl_from_IDirect3DSwapChain8
(
iface
);
struct
d3d8_device
*
device
=
impl_from_IDirect3DDevice8
(
swapchain
->
parent_device
);
HRESULT
hr
;
TRACE
(
"iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p.
\n
"
,
iface
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
);
if
(
device
->
device_state
!=
D3D8_DEVICE_STATE_OK
)
return
D3DERR_DEVICELOST
;
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
0
);
...
...
dlls/d3d8/tests/device.c
View file @
ee7eee55
...
...
@@ -6283,7 +6283,7 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice8_TestCooperativeLevel
(
device
);
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ret
=
ShowWindow
(
window
,
SW_RESTORE
);
ok
(
ret
,
"Failed to restore window.
\n
"
);
...
...
@@ -6292,7 +6292,7 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice8_TestCooperativeLevel
(
device
);
ok
(
hr
==
D3DERR_DEVICENOTRESET
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
reset_device
(
device
,
window
,
FALSE
);
ok
(
hr
==
D3D_OK
,
"Got unexpected 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