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
582767ce
Commit
582767ce
authored
Sep 06, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Only explicitly initialize non-zero fields in ddraw_create_gdi_swapchain().
Update ddraw_attach_d3d_device() for consistency.
parent
79c438b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
ddraw.c
dlls/ddraw/ddraw.c
+2
-16
No files found.
dlls/ddraw/ddraw.c
View file @
582767ce
...
...
@@ -2761,6 +2761,8 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac
/* Store the future Render Target surface */
ddraw
->
d3d_target
=
primary
;
memset
(
&
localParameters
,
0
,
sizeof
(
localParameters
));
/* Use the surface description for the device parameters, not the device
* settings. The application might render to an offscreen surface. */
localParameters
.
BackBufferWidth
=
primary
->
surface_desc
.
dwWidth
;
...
...
@@ -2768,17 +2770,9 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac
localParameters
.
BackBufferFormat
=
PixelFormat_DD2WineD3D
(
&
primary
->
surface_desc
.
u4
.
ddpfPixelFormat
);
localParameters
.
BackBufferCount
=
(
primary
->
surface_desc
.
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
?
primary
->
surface_desc
.
dwBackBufferCount
:
0
;
localParameters
.
MultiSampleType
=
WINED3DMULTISAMPLE_NONE
;
localParameters
.
MultiSampleQuality
=
0
;
localParameters
.
SwapEffect
=
WINED3DSWAPEFFECT_COPY
;
localParameters
.
hDeviceWindow
=
window
;
localParameters
.
Windowed
=
!
(
ddraw
->
cooperative_level
&
DDSCL_FULLSCREEN
);
localParameters
.
EnableAutoDepthStencil
=
FALSE
;
localParameters
.
AutoDepthStencilFormat
=
WINED3DFMT_UNKNOWN
;
localParameters
.
Flags
=
0
;
localParameters
.
FullScreen_RefreshRateInHz
=
WINED3DPRESENT_RATE_DEFAULT
;
localParameters
.
PresentationInterval
=
WINED3DPRESENT_INTERVAL_DEFAULT
;
localParameters
.
AutoRestoreDisplayMode
=
FALSE
;
/* Set this NOW, otherwise creating the depth stencil surface will cause a
* recursive loop until ram or emulated video memory is full. */
...
...
@@ -2823,17 +2817,9 @@ static HRESULT ddraw_create_gdi_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSur
presentation_parameters
.
BackBufferFormat
=
PixelFormat_DD2WineD3D
(
&
primary
->
surface_desc
.
u4
.
ddpfPixelFormat
);
presentation_parameters
.
BackBufferCount
=
(
primary
->
surface_desc
.
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
?
primary
->
surface_desc
.
dwBackBufferCount
:
0
;
presentation_parameters
.
MultiSampleType
=
WINED3DMULTISAMPLE_NONE
;
presentation_parameters
.
MultiSampleQuality
=
0
;
presentation_parameters
.
SwapEffect
=
WINED3DSWAPEFFECT_FLIP
;
presentation_parameters
.
hDeviceWindow
=
window
;
presentation_parameters
.
Windowed
=
!
(
ddraw
->
cooperative_level
&
DDSCL_FULLSCREEN
);
presentation_parameters
.
EnableAutoDepthStencil
=
FALSE
;
/* Not on GDI swapchains */
presentation_parameters
.
AutoDepthStencilFormat
=
0
;
presentation_parameters
.
Flags
=
0
;
presentation_parameters
.
FullScreen_RefreshRateInHz
=
WINED3DPRESENT_RATE_DEFAULT
;
presentation_parameters
.
PresentationInterval
=
WINED3DPRESENT_INTERVAL_DEFAULT
;
presentation_parameters
.
AutoRestoreDisplayMode
=
FALSE
;
ddraw
->
d3d_target
=
primary
;
hr
=
wined3d_device_init_gdi
(
ddraw
->
wined3d_device
,
&
presentation_parameters
);
...
...
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