Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
74345201
Commit
74345201
authored
13 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ddraw: Move setting ddraw->d3d_target out of ddraw_attach_d3d_device().
parent
08e8b0a7
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/ddraw/ddraw.c
+6
-27
6 additions, 27 deletions
dlls/ddraw/ddraw.c
with
6 additions
and
27 deletions
dlls/ddraw/ddraw.c
+
6
−
27
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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment