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
eea1b79e
Commit
eea1b79e
authored
Dec 22, 2022
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Move the wined3d_texture_update_desc() call into ddraw_surface_create_wined3d_texture().
parent
b15339d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
surface.c
dlls/ddraw/surface.c
+11
-11
No files found.
dlls/ddraw/surface.c
View file @
eea1b79e
...
...
@@ -6017,6 +6017,7 @@ static HRESULT ddraw_surface_create_wined3d_texture(struct ddraw *ddraw,
struct
wined3d_texture
*
draw_texture
=
NULL
;
struct
ddraw_surface
*
parent
;
unsigned
int
bind_flags
;
unsigned
int
pitch
=
0
;
unsigned
int
i
;
HRESULT
hr
;
...
...
@@ -6041,6 +6042,8 @@ static HRESULT ddraw_surface_create_wined3d_texture(struct ddraw *ddraw,
WARN
(
"Invalid pitch %lu specified.
\n
"
,
desc
->
u1
.
lPitch
);
return
DDERR_INVALIDPARAMS
;
}
pitch
=
desc
->
u1
.
lPitch
;
}
}
...
...
@@ -6112,6 +6115,14 @@ static HRESULT ddraw_surface_create_wined3d_texture(struct ddraw *ddraw,
return
hr
;
}
if
((
desc
->
dwFlags
&
DDSD_LPSURFACE
)
&&
FAILED
(
hr
=
wined3d_texture_update_desc
(
*
wined3d_texture
,
0
,
wined3d_desc
->
width
,
wined3d_desc
->
height
,
wined3d_desc
->
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
desc
->
lpSurface
,
pitch
)))
{
ERR
(
"Failed to set surface memory, hr %#lx.
\n
"
,
hr
);
return
hr
;
}
wined3d_texture_decref
(
*
wined3d_texture
);
TRACE
(
"Surface %p, created draw_texture %p, wined3d_texture %p.
\n
"
,
...
...
@@ -6132,7 +6143,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
struct
ddraw_texture
*
texture
;
BOOL
sysmem_fallback
=
FALSE
;
unsigned
int
layers
=
1
;
unsigned
int
pitch
=
0
;
BOOL
reserve_memory
;
UINT
levels
,
i
,
j
;
HRESULT
hr
;
...
...
@@ -6579,8 +6589,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
heap_free
(
texture
);
return
DDERR_INVALIDPARAMS
;
}
pitch
=
desc
->
u1
.
lPitch
;
}
}
...
...
@@ -6706,14 +6714,6 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
}
}
if
((
desc
->
dwFlags
&
DDSD_LPSURFACE
)
&&
FAILED
(
hr
=
wined3d_texture_update_desc
(
wined3d_texture
,
0
,
wined3d_desc
.
width
,
wined3d_desc
.
height
,
wined3d_desc
.
format
,
WINED3D_MULTISAMPLE_NONE
,
0
,
desc
->
lpSurface
,
pitch
)))
{
ERR
(
"Failed to set surface memory, hr %#lx.
\n
"
,
hr
);
goto
fail
;
}
reserve_memory
=
!
(
desc
->
dwFlags
&
DDSD_LPSURFACE
)
&&
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_VIDEOMEMORY
&&
wined3d_display_mode_format
.
u1
.
dwRGBBitCount
<=
16
;
...
...
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