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
33d182dd
Commit
33d182dd
authored
Sep 25, 2018
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 25, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Reject creating DDSCAPS_VIDEOMEMORY surfaces with DDRAW_NO3D.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9efa178e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
surface.c
dlls/ddraw/surface.c
+10
-2
No files found.
dlls/ddraw/surface.c
View file @
33d182dd
...
...
@@ -6122,8 +6122,9 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
else
if
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_3DDEVICE
)
usage
=
WINED3DUSAGE_RENDERTARGET
;
if
(
SUCCEEDED
(
hr
=
wined3d_check_device_format
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
usage
,
WINED3D_RTYPE_TEXTURE_2D
,
wined3d_desc
.
format
)))
if
(
!
(
ddraw
->
flags
&
DDRAW_NO3D
)
&&
SUCCEEDED
(
hr
=
wined3d_check_device_format
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
WINED3D_DEVICE_TYPE_HAL
,
mode
.
format_id
,
usage
,
WINED3D_RTYPE_TEXTURE_2D
,
wined3d_desc
.
format
)))
desc
->
ddsCaps
.
dwCaps
|=
DDSCAPS_VIDEOMEMORY
;
else
desc
->
ddsCaps
.
dwCaps
|=
DDSCAPS_SYSTEMMEMORY
;
...
...
@@ -6257,6 +6258,13 @@ HRESULT ddraw_surface_create(struct ddraw *ddraw, const DDSURFACEDESC2 *surface_
return
DDERR_NOCOLORKEYHW
;
}
if
((
ddraw
->
flags
&
DDRAW_NO3D
)
&&
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_VIDEOMEMORY
))
{
WARN
(
"Video memory surfaces not supported without 3D support.
\n
"
);
heap_free
(
texture
);
return
DDERR_NODIRECTDRAWHW
;
}
if
(
desc
->
ddsCaps
.
dwCaps
&
(
DDSCAPS_OVERLAY
))
wined3d_desc
.
usage
|=
WINED3DUSAGE_OVERLAY
;
...
...
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