Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
559229aa
Commit
559229aa
authored
Nov 27, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 27, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Move the location validation from CreateSurface() to ddraw_surface_create_texture().
parent
4b3db52b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
ddraw.c
dlls/ddraw/ddraw.c
+0
-8
surface.c
dlls/ddraw/surface.c
+8
-0
No files found.
dlls/ddraw/ddraw.c
View file @
559229aa
...
...
@@ -2814,7 +2814,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
struct
ddraw_surface
*
object
=
NULL
;
HRESULT
hr
;
DDSURFACEDESC2
desc2
;
const
DWORD
sysvidmem
=
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
;
TRACE
(
"ddraw %p, surface_desc %p, surface %p, outer_unknown %p.
\n
"
,
ddraw
,
DDSD
,
surface
,
UnkOuter
);
...
...
@@ -2870,13 +2869,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
return
DDERR_INVALIDCAPS
;
}
/* This is a special case in ddrawex, but not allowed in ddraw. */
if
((
DDSD
->
ddsCaps
.
dwCaps
&
sysvidmem
)
==
sysvidmem
)
{
WARN
(
"Tried to create a surface in both system and video memory.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
/* Modify some flags */
copy_to_surfacedesc2
(
&
desc2
,
DDSD
);
...
...
dlls/ddraw/surface.c
View file @
559229aa
...
...
@@ -5608,6 +5608,14 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
DDRAW_dump_surface_desc
(
desc
);
}
/* This is a special case in ddrawex, but not allowed in ddraw. */
if
((
desc
->
ddsCaps
.
dwCaps
&
(
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
))
==
(
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
))
{
WARN
(
"Tried to create a surface in both system and video memory.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
if
((
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP_ALLFACES
)
&&
!
(
desc
->
ddsCaps
.
dwCaps2
&
DDSCAPS2_CUBEMAP
))
{
...
...
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