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
495e4619
Commit
495e4619
authored
Jun 23, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
Jun 26, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ddraw/wined3d: IDirectDrawSurface7::SetSurfaceDesc corrections.
parent
8059576c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
35 deletions
+39
-35
surface.c
dlls/ddraw/surface.c
+39
-26
surface.c
dlls/wined3d/surface.c
+0
-6
surface_gdi.c
dlls/wined3d/surface_gdi.c
+0
-1
wined3d_interface.h
include/wine/wined3d_interface.h
+0
-2
No files found.
dlls/ddraw/surface.c
View file @
495e4619
...
...
@@ -1860,49 +1860,62 @@ IDirectDrawSurfaceImpl_SetSurfaceDesc(IDirectDrawSurface7 *iface,
DWORD
Flags
)
{
ICOM_THIS_FROM
(
IDirectDrawSurfaceImpl
,
IDirectDrawSurface7
,
iface
);
BYTE
*
newSurface
=
NULL
;
DWORD
newSize
=
0
;
WINED3DFORMAT
newFormat
=
WINED3DFMT_UNKNOWN
;
HRESULT
hr
;
FIXME
(
"(%p)->(%p,%lx)
\n
"
,
This
,
DDSD
,
Flags
);
assert
(
0
);
TRACE
(
"(%p)->(%p,%lx)
\n
"
,
This
,
DDSD
,
Flags
);
if
(
!
DDSD
)
return
DDERR_INVALIDPARAMS
;
if
(
DDSD
->
dwFlags
&
DDSD_LPSURFACE
&&
DDSD
->
lpSurface
)
{
ERR
(
"Setting the surface memory isn't supported yet
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
DDSD
->
dwFlags
&
DDSD_PIXELFORMAT
)
{
newFormat
=
PixelFormat_DD2WineD3D
(
&
DDSD
->
u4
.
ddpfPixelFormat
);
if
(
newFormat
==
WINED3DFMT_UNKNOWN
)
{
ERR
(
"Requested to set an unknown pixelformat
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
if
(
newFormat
!=
PixelFormat_DD2WineD3D
(
&
This
->
surface_desc
.
u4
.
ddpfPixelFormat
)
)
{
hr
=
IWineD3DSurface_SetFormat
(
This
->
WineD3DSurface
,
newFormat
);
if
(
hr
!=
DD_OK
)
return
hr
;
}
}
if
(
DDSD
->
dwFlags
&
DDSD_
LPSURFACE
)
if
(
DDSD
->
dwFlags
&
DDSD_
CKDESTOVERLAY
)
{
newSurface
=
DDSD
->
lpSurface
;
newSize
=
DDSD
->
u1
.
dwLinearSize
;
/* to avoid unpredictable things */
assert
(
newSize
!=
0
);
IWineD3DSurface_SetColorKey
(
This
->
WineD3DSurface
,
DDCKEY_DESTOVERLAY
,
&
DDSD
->
u3
.
ddckCKDestOverlay
);
}
/* Better: Use SetFormat */
hr
=
IWineD3DSurface_SetPixelFormat
(
This
->
WineD3DSurface
,
newFormat
,
newSurface
,
newSize
);
if
(
hr
!=
DD_OK
)
return
hr
;
/* Store the new data. Not really necessary, as WineD3D stores it too,
* but for completeness
*/
if
(
newFormat
!=
WINED3DFMT_UNKNOWN
)
if
(
DDSD
->
dwFlags
&
DDSD_CKDESTBLT
)
{
IWineD3DSurface_SetColorKey
(
This
->
WineD3DSurface
,
DDCKEY_DESTBLT
,
&
DDSD
->
ddckCKDestBlt
);
}
if
(
DDSD
->
dwFlags
&
DDSD_CKSRCOVERLAY
)
{
This
->
surface_desc
.
dwFlags
|=
DDSD_PIXELFORMAT
;
This
->
surface_desc
.
u4
.
ddpfPixelFormat
=
DDSD
->
u4
.
ddpfPixelFormat
;
IWineD3DSurface_SetColorKey
(
This
->
WineD3DSurface
,
DDCKEY_SRCOVERLAY
,
&
DDSD
->
ddckCKSrcOverlay
);
}
if
(
newSurface
!=
NULL
)
if
(
DDSD
->
dwFlags
&
DDSD_CKSRCBLT
)
{
This
->
surface_desc
.
lpSurface
=
newSurface
;
This
->
surface_desc
.
u1
.
dwLinearSize
=
newSize
;
IWineD3DSurface_SetColorKey
(
This
->
WineD3DSurface
,
DDCKEY_SRCBLT
,
&
DDSD
->
ddckCKSrcBlt
);
}
This
->
surface_desc
=
*
DDSD
;
return
DD_OK
;
}
...
...
dlls/wined3d/surface.c
View file @
495e4619
...
...
@@ -2536,11 +2536,6 @@ HRESULT WINAPI IWineD3DSurfaceImpl_BltFast(IWineD3DSurface *iface, DWORD dstx, D
return
IWineGDISurfaceImpl_BltFast
(
iface
,
dstx
,
dsty
,
Source
,
rsrc
,
trans
);
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPixelFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
Format
,
BYTE
*
Surface
,
DWORD
Size
)
{
FIXME
(
"This is unimplemented for now(d3d7 merge)
\n
"
);
return
WINED3DERR_INVALIDCALL
;
}
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
**
Pal
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
Pal
);
...
...
@@ -2790,7 +2785,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DSurfaceImpl_IsLost
,
IWineD3DSurfaceImpl_Restore
,
IWineD3DSurfaceImpl_BltFast
,
IWineD3DSurfaceImpl_SetPixelFormat
,
IWineD3DSurfaceImpl_GetPalette
,
IWineD3DSurfaceImpl_SetPalette
,
IWineD3DSurfaceImpl_RealizePalette
,
...
...
dlls/wined3d/surface_gdi.c
View file @
495e4619
...
...
@@ -1538,7 +1538,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DSurfaceImpl_IsLost
,
IWineD3DSurfaceImpl_Restore
,
IWineGDISurfaceImpl_BltFast
,
IWineD3DSurfaceImpl_SetPixelFormat
,
IWineD3DSurfaceImpl_GetPalette
,
IWineD3DSurfaceImpl_SetPalette
,
IWineD3DSurfaceImpl_RealizePalette
,
...
...
include/wine/wined3d_interface.h
View file @
495e4619
...
...
@@ -1133,7 +1133,6 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
STDMETHOD
(
IsLost
)(
THIS
)
PURE
;
STDMETHOD
(
Restore
)(
THIS
)
PURE
;
STDMETHOD
(
BltFast
)(
THIS_
DWORD
dstx
,
DWORD
dsty
,
IWineD3DSurface
*
src
,
RECT
*
rsrc
,
DWORD
trans
)
PURE
;
STDMETHOD
(
SetPixelFormat
)(
THIS_
WINED3DFORMAT
Format
,
BYTE
*
Surface
,
DWORD
Size
)
PURE
;
STDMETHOD
(
GetPalette
)(
THIS_
struct
IWineD3DPalette
**
Palette
)
PURE
;
STDMETHOD
(
SetPalette
)(
THIS_
struct
IWineD3DPalette
*
Palette
)
PURE
;
STDMETHOD
(
RealizePalette
)(
THIS
)
PURE
;
...
...
@@ -1185,7 +1184,6 @@ DECLARE_INTERFACE_(IWineD3DSurface,IWineD3DResource)
#define IWineD3DSurface_IsLost(p) (p)->lpVtbl->IsLost(p)
#define IWineD3DSurface_Restore(p) (p)->lpVtbl->Restore(p)
#define IWineD3DSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e)
#define IWineD3DSurface_SetPixelFormat(p,a,b,c) (p)->lpVtbl->SetPixelFormat(p,a,b,c)
#define IWineD3DSurface_GetPalette(p, a) (p)->lpVtbl->GetPalette(p, a)
#define IWineD3DSurface_SetPalette(p, a) (p)->lpVtbl->SetPalette(p, a)
#define IWineD3DSurface_RealizePalette(p) (p)->lpVtbl->RealizePalette(p)
...
...
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