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
d5035088
Commit
d5035088
authored
Jun 27, 2014
by
Henri Verbeet
Committed by
Alexandre Julliard
Jun 27, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d9: Check the device status in present calls.
parent
09fda3b8
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
4 deletions
+14
-4
device.c
dlls/d3d9/device.c
+6
-0
swapchain.c
dlls/d3d9/swapchain.c
+4
-0
d3d9ex.c
dlls/d3d9/tests/d3d9ex.c
+2
-2
device.c
dlls/d3d9/tests/device.c
+2
-2
No files found.
dlls/d3d9/device.c
View file @
d5035088
...
...
@@ -646,6 +646,9 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_Present(IDirect3DDevice9Ex *
TRACE
(
"iface %p, src_rect %p, dst_rect %p, dst_window_override %p, dirty_region %p.
\n
"
,
iface
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
);
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
device
->
d3d_parent
->
extended
?
S_PRESENT_OCCLUDED
:
D3DERR_DEVICELOST
;
wined3d_mutex_lock
();
hr
=
wined3d_device_present
(
device
->
wined3d_device
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
0
);
...
...
@@ -3085,6 +3088,9 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_device_PresentEx(IDirect3DDevice9Ex
iface
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
,
flags
);
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
S_PRESENT_OCCLUDED
;
wined3d_mutex_lock
();
hr
=
wined3d_device_present
(
device
->
wined3d_device
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
flags
);
...
...
dlls/d3d9/swapchain.c
View file @
d5035088
...
...
@@ -115,12 +115,16 @@ static HRESULT WINAPI DECLSPEC_HOTPATCH d3d9_swapchain_Present(IDirect3DSwapChai
const
RGNDATA
*
dirty_region
,
DWORD
flags
)
{
struct
d3d9_swapchain
*
swapchain
=
impl_from_IDirect3DSwapChain9Ex
(
iface
);
struct
d3d9_device
*
device
=
impl_from_IDirect3DDevice9Ex
(
swapchain
->
parent_device
);
HRESULT
hr
;
TRACE
(
"iface %p, src_rect %s, dst_rect %s, dst_window_override %p, dirty_region %p, flags %#x.
\n
"
,
iface
,
wine_dbgstr_rect
(
src_rect
),
wine_dbgstr_rect
(
dst_rect
),
dst_window_override
,
dirty_region
,
flags
);
if
(
device
->
device_state
!=
D3D9_DEVICE_STATE_OK
)
return
device
->
d3d_parent
->
extended
?
S_PRESENT_OCCLUDED
:
D3DERR_DEVICELOST
;
wined3d_mutex_lock
();
hr
=
wined3d_swapchain_present
(
swapchain
->
wined3d_swapchain
,
src_rect
,
dst_rect
,
dst_window_override
,
dirty_region
,
flags
);
...
...
dlls/d3d9/tests/d3d9ex.c
View file @
d5035088
...
...
@@ -1226,9 +1226,9 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice9Ex_TestCooperativeLevel
(
device
);
ok
(
hr
==
D3D_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9Ex_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
S_PRESENT_OCCLUDED
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_PRESENT_OCCLUDED
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9Ex_PresentEx
(
device
,
NULL
,
NULL
,
NULL
,
NULL
,
0
);
todo_wine
ok
(
hr
==
S_PRESENT_OCCLUDED
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ok
(
hr
==
S_PRESENT_OCCLUDED
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9Ex_CheckDeviceState
(
device
,
window
);
todo_wine
ok
(
hr
==
S_PRESENT_OCCLUDED
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9Ex_CheckDeviceState
(
device
,
NULL
);
...
...
dlls/d3d9/tests/device.c
View file @
d5035088
...
...
@@ -8932,7 +8932,7 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
device
);
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_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
"
);
...
...
@@ -8941,7 +8941,7 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice9_TestCooperativeLevel
(
device
);
ok
(
hr
==
D3DERR_DEVICENOTRESET
,
"Got unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirect3DDevice9_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