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
53183b4c
Commit
53183b4c
authored
Sep 08, 2010
by
Henri Verbeet
Committed by
Alexandre Julliard
Sep 08, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: IWineD3DSurface_GetDesc() should never fail.
parent
f49028d9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
44 deletions
+31
-44
surface.c
dlls/d3d8/surface.c
+10
-14
surface.c
dlls/d3d9/surface.c
+10
-14
ddraw.c
dlls/ddraw/ddraw.c
+1
-2
surface.c
dlls/ddraw/surface.c
+1
-7
cubetexture.c
dlls/wined3d/cubetexture.c
+3
-1
surface_base.c
dlls/wined3d/surface_base.c
+1
-3
texture.c
dlls/wined3d/texture.c
+3
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
wined3d.idl
include/wine/wined3d.idl
+1
-1
No files found.
dlls/d3d8/surface.c
View file @
53183b4c
...
...
@@ -190,27 +190,23 @@ static HRESULT WINAPI IDirect3DSurface8Impl_GetContainer(LPDIRECT3DSURFACE8 ifac
static
HRESULT
WINAPI
IDirect3DSurface8Impl_GetDesc
(
LPDIRECT3DSURFACE8
iface
,
D3DSURFACE_DESC
*
pDesc
)
{
IDirect3DSurface8Impl
*
This
=
(
IDirect3DSurface8Impl
*
)
iface
;
WINED3DSURFACE_DESC
wined3ddesc
;
HRESULT
hr
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
pDesc
);
wined3d_mutex_lock
();
hr
=
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
{
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
wined3ddesc
.
format
);
pDesc
->
Type
=
wined3ddesc
.
resource_type
;
pDesc
->
Usage
=
wined3ddesc
.
usage
;
pDesc
->
Pool
=
wined3ddesc
.
pool
;
pDesc
->
Size
=
wined3ddesc
.
size
;
pDesc
->
MultiSampleType
=
wined3ddesc
.
multisample_type
;
pDesc
->
Width
=
wined3ddesc
.
width
;
pDesc
->
Height
=
wined3ddesc
.
height
;
}
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
wined3ddesc
.
format
);
pDesc
->
Type
=
wined3ddesc
.
resource_type
;
pDesc
->
Usage
=
wined3ddesc
.
usage
;
pDesc
->
Pool
=
wined3ddesc
.
pool
;
pDesc
->
Size
=
wined3ddesc
.
size
;
pDesc
->
MultiSampleType
=
wined3ddesc
.
multisample_type
;
pDesc
->
Width
=
wined3ddesc
.
width
;
pDesc
->
Height
=
wined3ddesc
.
height
;
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DSurface8Impl_LockRect
(
LPDIRECT3DSURFACE8
iface
,
D3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
)
{
...
...
dlls/d3d9/surface.c
View file @
53183b4c
...
...
@@ -246,27 +246,23 @@ static HRESULT WINAPI IDirect3DSurface9Impl_GetContainer(LPDIRECT3DSURFACE9 ifac
static
HRESULT
WINAPI
IDirect3DSurface9Impl_GetDesc
(
LPDIRECT3DSURFACE9
iface
,
D3DSURFACE_DESC
*
pDesc
)
{
IDirect3DSurface9Impl
*
This
=
(
IDirect3DSurface9Impl
*
)
iface
;
WINED3DSURFACE_DESC
wined3ddesc
;
HRESULT
hr
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
pDesc
);
wined3d_mutex_lock
();
hr
=
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
IWineD3DSurface_GetDesc
(
This
->
wineD3DSurface
,
&
wined3ddesc
);
wined3d_mutex_unlock
();
if
(
SUCCEEDED
(
hr
))
{
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
wined3ddesc
.
format
);
pDesc
->
Type
=
wined3ddesc
.
resource_type
;
pDesc
->
Usage
=
wined3ddesc
.
usage
;
pDesc
->
Pool
=
wined3ddesc
.
pool
;
pDesc
->
MultiSampleType
=
wined3ddesc
.
multisample_type
;
pDesc
->
MultiSampleQuality
=
wined3ddesc
.
multisample_quality
;
pDesc
->
Width
=
wined3ddesc
.
width
;
pDesc
->
Height
=
wined3ddesc
.
height
;
}
pDesc
->
Format
=
d3dformat_from_wined3dformat
(
wined3ddesc
.
format
);
pDesc
->
Type
=
wined3ddesc
.
resource_type
;
pDesc
->
Usage
=
wined3ddesc
.
usage
;
pDesc
->
Pool
=
wined3ddesc
.
pool
;
pDesc
->
MultiSampleType
=
wined3ddesc
.
multisample_type
;
pDesc
->
MultiSampleQuality
=
wined3ddesc
.
multisample_quality
;
pDesc
->
Width
=
wined3ddesc
.
width
;
pDesc
->
Height
=
wined3ddesc
.
height
;
return
hr
;
return
D3D_OK
;
}
static
HRESULT
WINAPI
IDirect3DSurface9Impl_LockRect
(
LPDIRECT3DSURFACE9
iface
,
D3DLOCKED_RECT
*
pLockedRect
,
CONST
RECT
*
pRect
,
DWORD
Flags
)
{
...
...
dlls/ddraw/ddraw.c
View file @
53183b4c
...
...
@@ -2389,8 +2389,7 @@ HRESULT WINAPI ddraw_recreate_surfaces_cb(IDirectDrawSurface7 *surf, DDSURFACEDE
IWineD3DSurface_GetClipper
(
wineD3DSurface
,
&
clipper
);
/* Get the surface properties */
hr
=
IWineD3DSurface_GetDesc
(
wineD3DSurface
,
&
Desc
);
if
(
hr
!=
D3D_OK
)
return
hr
;
IWineD3DSurface_GetDesc
(
wineD3DSurface
,
&
Desc
);
Format
=
Desc
.
format
;
Usage
=
Desc
.
usage
;
...
...
dlls/ddraw/surface.c
View file @
53183b4c
...
...
@@ -3588,13 +3588,7 @@ HRESULT ddraw_surface_init(IDirectDrawSurfaceImpl *surface, IDirectDrawImpl *ddr
}
surface
->
surface_desc
.
dwFlags
|=
DDSD_PIXELFORMAT
;
hr
=
IWineD3DSurface_GetDesc
(
surface
->
WineD3DSurface
,
&
wined3d_desc
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get wined3d surface desc, hr %#x.
\n
"
,
hr
);
IWineD3DSurface_Release
(
surface
->
WineD3DSurface
);
return
hr
;
}
IWineD3DSurface_GetDesc
(
surface
->
WineD3DSurface
,
&
wined3d_desc
);
format
=
wined3d_desc
.
format
;
if
(
format
==
WINED3DFMT_UNKNOWN
)
...
...
dlls/wined3d/cubetexture.c
View file @
53183b4c
...
...
@@ -337,7 +337,9 @@ static HRESULT WINAPI IWineD3DCubeTextureImpl_GetLevelDesc(IWineD3DCubeTexture *
return
WINED3DERR_INVALIDCALL
;
}
return
IWineD3DSurface_GetDesc
(
surface
,
desc
);
IWineD3DSurface_GetDesc
(
surface
,
desc
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DCubeTextureImpl_GetCubeMapSurface
(
IWineD3DCubeTexture
*
iface
,
...
...
dlls/wined3d/surface_base.c
View file @
53183b4c
...
...
@@ -146,7 +146,7 @@ void * WINAPI IWineD3DBaseSurfaceImpl_GetParent(IWineD3DSurface *iface)
return
((
IWineD3DSurfaceImpl
*
)
iface
)
->
resource
.
parent
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
desc
)
void
WINAPI
IWineD3DBaseSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
desc
)
{
IWineD3DSurfaceImpl
*
surface
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -161,8 +161,6 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_GetDesc(IWineD3DSurface *iface, WINED3DSU
desc
->
multisample_quality
=
surface
->
currentDesc
.
MultiSampleQuality
;
desc
->
width
=
surface
->
currentDesc
.
Width
;
desc
->
height
=
surface
->
currentDesc
.
Height
;
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetBltStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
)
...
...
dlls/wined3d/texture.c
View file @
53183b4c
...
...
@@ -353,7 +353,9 @@ static HRESULT WINAPI IWineD3DTextureImpl_GetLevelDesc(IWineD3DTexture *iface, U
return
WINED3DERR_INVALIDCALL
;
}
return
IWineD3DSurface_GetDesc
(
surface
,
desc
);
IWineD3DSurface_GetDesc
(
surface
,
desc
);
return
WINED3D_OK
;
}
static
HRESULT
WINAPI
IWineD3DTextureImpl_GetSurfaceLevel
(
IWineD3DTexture
*
iface
,
...
...
dlls/wined3d/wined3d_private.h
View file @
53183b4c
...
...
@@ -2151,7 +2151,7 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_FreePrivateData(IWineD3DSurface *iface, R
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
)
DECLSPEC_HIDDEN
;
DWORD
WINAPI
IWineD3DBaseSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
WINED3DRESOURCETYPE
WINAPI
IWineD3DBaseSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
desc
)
DECLSPEC_HIDDEN
;
void
WINAPI
IWineD3DBaseSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
desc
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetBltStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetFlipStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
)
DECLSPEC_HIDDEN
;
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_IsLost
(
IWineD3DSurface
*
iface
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
53183b4c
...
...
@@ -2373,7 +2373,7 @@ interface IWineD3DClipper : IUnknown
]
interface
IWineD3DSurface
:
IWineD3DResource
{
HRESULT
GetDesc
(
void
GetDesc
(
[
out
]
WINED3DSURFACE_DESC
*
desc
)
;
HRESULT
LockRect
(
...
...
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