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
74345201
Commit
74345201
authored
Nov 23, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 23, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Move setting ddraw->d3d_target out of ddraw_attach_d3d_device().
parent
08e8b0a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
27 deletions
+6
-27
ddraw.c
dlls/ddraw/ddraw.c
+6
-27
No files found.
dlls/ddraw/ddraw.c
View file @
74345201
...
...
@@ -2522,26 +2522,13 @@ CreateAdditionalSurfaces(IDirectDrawImpl *This,
return
DD_OK
;
}
/*****************************************************************************
* ddraw_attach_d3d_device
*
* Initializes the D3D capabilities of WineD3D
*
* Params:
* primary: The primary surface for D3D
*
* Returns
* DD_OK on success,
* DDERR_* otherwise
*
*****************************************************************************/
static
HRESULT
ddraw_attach_d3d_device
(
IDirectDrawImpl
*
ddraw
,
IDirectDrawSurfaceImpl
*
primary
,
static
HRESULT
ddraw_attach_d3d_device
(
IDirectDrawImpl
*
ddraw
,
WINED3DPRESENT_PARAMETERS
*
presentation_parameters
)
{
HWND
window
=
presentation_parameters
->
hDeviceWindow
;
HRESULT
hr
;
TRACE
(
"ddraw %p
, primary %p.
\n
"
,
ddraw
,
primary
);
TRACE
(
"ddraw %p
.
\n
"
,
ddraw
);
if
(
!
window
||
window
==
GetDesktopWindow
())
{
...
...
@@ -2565,9 +2552,6 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac
}
ddraw
->
d3d_window
=
window
;
/* Store the future Render Target surface */
ddraw
->
d3d_target
=
primary
;
/* Set this NOW, otherwise creating the depth stencil surface will cause a
* recursive loop until ram or emulated video memory is full. */
ddraw
->
d3d_initialized
=
TRUE
;
...
...
@@ -2597,7 +2581,6 @@ static HRESULT ddraw_attach_d3d_device(IDirectDrawImpl *ddraw, IDirectDrawSurfac
static
HRESULT
ddraw_create_swapchain
(
IDirectDrawImpl
*
ddraw
,
IDirectDrawSurfaceImpl
*
surface
)
{
WINED3DPRESENT_PARAMETERS
presentation_parameters
;
IDirectDrawSurfaceImpl
*
target
=
surface
;
struct
wined3d_display_mode
mode
;
HRESULT
hr
=
WINED3D_OK
;
...
...
@@ -2612,12 +2595,6 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSurface
return
hr
;
}
if
(
ddraw
->
primary
)
{
TRACE
(
"Using primary %p.
\n
"
,
ddraw
->
primary
);
target
=
ddraw
->
primary
;
}
memset
(
&
presentation_parameters
,
0
,
sizeof
(
presentation_parameters
));
presentation_parameters
.
BackBufferWidth
=
mode
.
width
;
presentation_parameters
.
BackBufferHeight
=
mode
.
height
;
...
...
@@ -2635,8 +2612,7 @@ static HRESULT ddraw_create_swapchain(IDirectDrawImpl *ddraw, IDirectDrawSurface
* target creation will cause the 3D init. */
if
(
DefaultSurfaceType
==
SURFACE_OPENGL
)
{
TRACE
(
"Attaching a D3DDevice, rendertarget = %p.
\n
"
,
target
);
hr
=
ddraw_attach_d3d_device
(
ddraw
,
target
,
&
presentation_parameters
);
hr
=
ddraw_attach_d3d_device
(
ddraw
,
&
presentation_parameters
);
}
else
if
(
surface
->
surface_desc
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
{
...
...
@@ -3061,6 +3037,9 @@ static HRESULT CreateSurface(IDirectDrawImpl *ddraw, DDSURFACEDESC2 *DDSD,
wined3d_mutex_unlock
();
return
hr
;
}
if
(
DefaultSurfaceType
==
SURFACE_OPENGL
)
ddraw
->
d3d_target
=
ddraw
->
primary
?
ddraw
->
primary
:
object
;
}
if
(
desc2
.
ddsCaps
.
dwCaps
&
DDSCAPS_PRIMARYSURFACE
)
...
...
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