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
8dd44e28
Commit
8dd44e28
authored
Dec 01, 2014
by
Stefan Dösinger
Committed by
Alexandre Julliard
Dec 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d8: Refuse to reset a lost device.
parent
aa9bc4c5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
device.c
dlls/d3d8/device.c
+6
-0
device.c
dlls/d3d8/tests/device.c
+11
-0
No files found.
dlls/d3d8/device.c
View file @
8dd44e28
...
...
@@ -647,6 +647,12 @@ static HRESULT WINAPI d3d8_device_Reset(IDirect3DDevice8 *iface,
TRACE
(
"iface %p, present_parameters %p.
\n
"
,
iface
,
present_parameters
);
if
(
device
->
device_state
==
D3D8_DEVICE_STATE_LOST
)
{
WARN
(
"App not active, returning D3DERR_DEVICELOST.
\n
"
);
return
D3DERR_DEVICELOST
;
}
wined3d_mutex_lock
();
if
(
device
->
vertex_buffer
)
...
...
dlls/d3d8/tests/device.c
View file @
8dd44e28
...
...
@@ -6863,6 +6863,17 @@ static void test_lost_device(void)
hr
=
IDirect3DDevice8_Present
(
device
,
NULL
,
NULL
,
NULL
,
NULL
);
todo_wine
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ret
=
SetForegroundWindow
(
GetDesktopWindow
());
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
hr
==
D3DERR_DEVICELOST
,
"Got unexpected hr %#x.
\n
"
,
hr
);
ret
=
ShowWindow
(
window
,
SW_RESTORE
);
ok
(
ret
,
"Failed to restore window.
\n
"
);
ret
=
SetForegroundWindow
(
window
);
ok
(
ret
,
"Failed to set foreground window.
\n
"
);
hr
=
reset_device
(
device
,
&
device_desc
);
ok
(
hr
==
D3D_OK
,
"Got unexpected hr %#x.
\n
"
,
hr
);
refcount
=
IDirect3DDevice8_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left.
\n
"
,
refcount
);
done:
...
...
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