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
dcf08f01
Commit
dcf08f01
authored
Feb 05, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Recreate the contexts on _Reset.
parent
e7393a8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
device.c
dlls/wined3d/device.c
+25
-0
No files found.
dlls/wined3d/device.c
View file @
dcf08f01
...
...
@@ -6776,6 +6776,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
BOOL
DisplayModeChanged
=
FALSE
;
WINED3DDISPLAYMODE
mode
;
IWineD3DBaseShaderImpl
*
shader
;
IWineD3DSurfaceImpl
*
target
;
TRACE
(
"(%p)
\n
"
,
This
);
hr
=
IWineD3DDevice_GetSwapChain
(
iface
,
0
,
(
IWineD3DSwapChain
**
)
&
swapchain
);
...
...
@@ -6846,6 +6847,14 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
}
This
->
shader_backend
->
shader_destroy_depth_blt
(
iface
);
while
(
This
->
numContexts
)
{
DestroyContext
(
This
,
This
->
contexts
[
0
]);
}
This
->
activeContext
=
NULL
;
HeapFree
(
GetProcessHeap
(),
0
,
swapchain
->
context
);
swapchain
->
context
=
NULL
;
swapchain
->
num_contexts
=
0
;
if
(
pPresentationParameters
->
Windowed
)
{
mode
.
Width
=
swapchain
->
orig_width
;
mode
.
Height
=
swapchain
->
orig_height
;
...
...
@@ -6910,6 +6919,22 @@ static HRESULT WINAPI IWineD3DDeviceImpl_Reset(IWineD3DDevice* iface, WINED3DPRE
swapchain
->
presentParms
.
Windowed
=
pPresentationParameters
->
Windowed
;
}
/* Recreate the primary swapchain's context */
swapchain
->
context
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
*
swapchain
->
context
));
if
(
swapchain
->
backBuffer
)
{
target
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
backBuffer
[
0
];
}
else
{
target
=
(
IWineD3DSurfaceImpl
*
)
swapchain
->
frontBuffer
;
}
swapchain
->
context
[
0
]
=
CreateContext
(
This
,
target
,
swapchain
->
win_handle
,
FALSE
,
&
swapchain
->
presentParms
);
swapchain
->
num_contexts
=
1
;
This
->
activeContext
=
swapchain
->
context
[
0
];
/* All done. There is no need to reload resources or shaders, this will happen automatically on the
* first use
*/
IWineD3DSwapChain_Release
((
IWineD3DSwapChain
*
)
swapchain
);
return
WINED3D_OK
;
}
...
...
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