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
f0f38d9b
Commit
f0f38d9b
authored
Nov 26, 2013
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 26, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw: Move the TEXTUREMANAGE validation from CreateSurface() to ddraw_surface_create_texture().
parent
4d9c3151
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
ddraw.c
dlls/ddraw/ddraw.c
+0
-15
surface.c
dlls/ddraw/surface.c
+15
-0
No files found.
dlls/ddraw/ddraw.c
View file @
f0f38d9b
...
...
@@ -2901,21 +2901,6 @@ static HRESULT CreateSurface(struct ddraw *ddraw, DDSURFACEDESC2 *DDSD,
}
}
if
(
DDSD
->
ddsCaps
.
dwCaps2
&
(
DDSCAPS2_TEXTUREMANAGE
|
DDSCAPS2_D3DTEXTUREMANAGE
))
{
if
(
!
(
DDSD
->
ddsCaps
.
dwCaps
&
DDSCAPS_TEXTURE
))
{
WARN
(
"DDSCAPS2_TEXTUREMANAGE used without DDSCAPS_TEXTURE, returning DDERR_INVALIDCAPS.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
if
(
DDSD
->
ddsCaps
.
dwCaps
&
(
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
))
{
WARN
(
"DDSCAPS2_TEXTUREMANAGE used width DDSCAPS_VIDEOMEMORY "
"or DDSCAPS_SYSTEMMEMORY, returning DDERR_INVALIDCAPS.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
}
/* Modify some flags */
copy_to_surfacedesc2
(
&
desc2
,
DDSD
);
...
...
dlls/ddraw/surface.c
View file @
f0f38d9b
...
...
@@ -5608,6 +5608,21 @@ HRESULT ddraw_surface_create_texture(struct ddraw *ddraw, DDSURFACEDESC2 *desc,
DDRAW_dump_surface_desc
(
desc
);
}
if
(
desc
->
ddsCaps
.
dwCaps2
&
(
DDSCAPS2_TEXTUREMANAGE
|
DDSCAPS2_D3DTEXTUREMANAGE
))
{
if
(
!
(
desc
->
ddsCaps
.
dwCaps
&
DDSCAPS_TEXTURE
))
{
WARN
(
"DDSCAPS2_TEXTUREMANAGE used without DDSCAPS_TEXTURE, returning DDERR_INVALIDCAPS.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
if
(
desc
->
ddsCaps
.
dwCaps
&
(
DDSCAPS_VIDEOMEMORY
|
DDSCAPS_SYSTEMMEMORY
))
{
WARN
(
"DDSCAPS2_TEXTUREMANAGE used width DDSCAPS_VIDEOMEMORY "
"or DDSCAPS_SYSTEMMEMORY, returning DDERR_INVALIDCAPS.
\n
"
);
return
DDERR_INVALIDCAPS
;
}
}
if
(
FAILED
(
hr
=
wined3d_get_adapter_display_mode
(
ddraw
->
wined3d
,
WINED3DADAPTER_DEFAULT
,
&
mode
,
NULL
)))
{
ERR
(
"Failed to get display mode, hr %#x.
\n
"
,
hr
);
...
...
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