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
8e84127a
Commit
8e84127a
authored
Feb 15, 2007
by
Stefan Dösinger
Committed by
Alexandre Julliard
Feb 15, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Restore the display mode when releasing a swapchain.
parent
3b3e8653
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
device.c
dlls/wined3d/device.c
+1
-0
swapchain.c
dlls/wined3d/swapchain.c
+13
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
8e84127a
...
...
@@ -1288,6 +1288,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateAdditionalSwapChain(IWineD3DDevic
object
->
orig_width
=
GetSystemMetrics
(
SM_CXSCREEN
);
object
->
orig_height
=
GetSystemMetrics
(
SM_CYSCREEN
);
object
->
orig_fmt
=
pixelformat_for_depth
(
GetDeviceCaps
(
hDc
,
BITSPIXEL
)
*
GetDeviceCaps
(
hDc
,
PLANES
));
/** MSDN: If Windowed is TRUE and either of the BackBufferWidth/Height values is zero,
* then the corresponding dimension of the client area of the hDeviceWindow
...
...
dlls/wined3d/swapchain.c
View file @
8e84127a
...
...
@@ -104,6 +104,7 @@ static HRESULT WINAPI IWineD3DSwapChainImpl_GetParent(IWineD3DSwapChain *iface,
/*IWineD3DSwapChain parts follow: */
static
void
WINAPI
IWineD3DSwapChainImpl_Destroy
(
IWineD3DSwapChain
*
iface
,
D3DCB_DESTROYSURFACEFN
D3DCB_DestroyRenderTarget
)
{
IWineD3DSwapChainImpl
*
This
=
(
IWineD3DSwapChainImpl
*
)
iface
;
WINED3DDISPLAYMODE
mode
;
/* release the ref to the front and back buffer parents */
if
(
This
->
frontBuffer
)
{
...
...
@@ -123,6 +124,18 @@ static void WINAPI IWineD3DSwapChainImpl_Destroy(IWineD3DSwapChain *iface, D3DCB
}
}
/* Restore the screen resolution if we rendered in fullscreen
* This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
* before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params
*/
if
(
This
->
presentParms
.
Windowed
==
FALSE
)
{
mode
.
Width
=
This
->
orig_width
;
mode
.
Height
=
This
->
orig_height
;
mode
.
RefreshRate
=
0
;
mode
.
Format
=
This
->
orig_fmt
;
IWineD3DDevice_SetDisplayMode
((
IWineD3DDevice
*
)
This
->
wineD3DDevice
,
0
,
&
mode
);
}
DestroyContext
(
This
->
wineD3DDevice
,
This
->
context
);
HeapFree
(
GetProcessHeap
(),
0
,
This
);
...
...
dlls/wined3d/wined3d_private.h
View file @
8e84127a
...
...
@@ -1318,6 +1318,7 @@ typedef struct IWineD3DSwapChainImpl
BOOL
wantsDepthStencilBuffer
;
D3DPRESENT_PARAMETERS
presentParms
;
DWORD
orig_width
,
orig_height
;
WINED3DFORMAT
orig_fmt
;
long
prev_time
,
frames
;
/* Performance tracking */
...
...
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