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
e795d842
Commit
e795d842
authored
Aug 05, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Aug 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement overlay position tracking.
parent
a7d5b1e9
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
92 additions
and
5 deletions
+92
-5
surface.c
dlls/ddraw/surface.c
+7
-1
surface_base.c
dlls/wined3d/surface_base.c
+55
-4
wined3d_private.h
dlls/wined3d/wined3d_private.h
+5
-0
wined3d_interface.h
include/wine/wined3d_interface.h
+1
-0
wined3d_types.h
include/wine/wined3d_types.h
+24
-0
No files found.
dlls/ddraw/surface.c
View file @
e795d842
...
...
@@ -1841,7 +1841,13 @@ IDirectDrawSurfaceImpl_UpdateOverlay(IDirectDrawSurface7 *iface,
Flags
,
(
WINEDDOVERLAYFX
*
)
FX
);
LeaveCriticalSection
(
&
ddraw_cs
);
return
hr
;
switch
(
hr
)
{
case
WINED3DERR_INVALIDCALL
:
return
DDERR_INVALIDPARAMS
;
case
WINEDDERR_NOTAOVERLAYSURFACE
:
return
DDERR_NOTAOVERLAYSURFACE
;
case
WINEDDERR_OVERLAYNOTVISIBLE
:
return
DDERR_OVERLAYNOTVISIBLE
;
default:
return
hr
;
}
}
/*****************************************************************************
...
...
dlls/wined3d/surface_base.c
View file @
e795d842
...
...
@@ -357,8 +357,9 @@ DWORD WINAPI IWineD3DBaseSurfaceImpl_GetPitch(IWineD3DSurface *iface) {
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_SetOverlayPosition
(
IWineD3DSurface
*
iface
,
LONG
X
,
LONG
Y
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
LONG
w
,
h
;
FIXM
E
(
"(%p)->(%d,%d) Stub!
\n
"
,
This
,
X
,
Y
);
TRAC
E
(
"(%p)->(%d,%d) Stub!
\n
"
,
This
,
X
,
Y
);
if
(
!
(
This
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
))
{
...
...
@@ -366,21 +367,38 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_SetOverlayPosition(IWineD3DSurface *iface
return
WINEDDERR_NOTAOVERLAYSURFACE
;
}
w
=
This
->
overlay_destrect
.
right
-
This
->
overlay_destrect
.
left
;
h
=
This
->
overlay_destrect
.
bottom
-
This
->
overlay_destrect
.
top
;
This
->
overlay_destrect
.
left
=
X
;
This
->
overlay_destrect
.
top
=
Y
;
This
->
overlay_destrect
.
right
=
X
+
w
;
This
->
overlay_destrect
.
bottom
=
Y
+
h
;
return
WINED3D_OK
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_GetOverlayPosition
(
IWineD3DSurface
*
iface
,
LONG
*
X
,
LONG
*
Y
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
HRESULT
hr
;
FIXME
(
"(%p)->(%p,%p) Stub!
\n
"
,
This
,
X
,
Y
);
TRACE
(
"(%p)->(%p,%p)
\n
"
,
This
,
X
,
Y
);
if
(
!
(
This
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
))
{
TRACE
(
"(%p): Not an overlay surface
\n
"
,
This
);
return
WINEDDERR_NOTAOVERLAYSURFACE
;
}
if
(
This
->
overlay_dest
==
NULL
)
{
*
X
=
0
;
*
Y
=
0
;
hr
=
WINEDDERR_OVERLAYNOTVISIBLE
;
}
else
{
*
X
=
This
->
overlay_destrect
.
left
;
*
Y
=
This
->
overlay_destrect
.
top
;
hr
=
WINED3D_OK
;
}
return
WINED3D_OK
;
TRACE
(
"Returning 0x%08x, position %d, %d
\n
"
,
hr
,
*
X
,
*
Y
);
return
hr
;
}
HRESULT
WINAPI
IWineD3DBaseSurfaceImpl_UpdateOverlayZOrder
(
IWineD3DSurface
*
iface
,
DWORD
Flags
,
IWineD3DSurface
*
Ref
)
{
...
...
@@ -405,8 +423,41 @@ HRESULT WINAPI IWineD3DBaseSurfaceImpl_UpdateOverlay(IWineD3DSurface *iface, REC
if
(
!
(
This
->
resource
.
usage
&
WINED3DUSAGE_OVERLAY
))
{
TRACE
(
"(%p): Not an overlay surface
\n
"
,
This
);
WARN
(
"(%p): Not an overlay surface
\n
"
,
This
);
return
WINEDDERR_NOTAOVERLAYSURFACE
;
}
else
if
(
!
DstSurface
)
{
WARN
(
"(%p): Dest surface is NULL
\n
"
,
This
);
return
WINED3DERR_INVALIDCALL
;
}
if
(
SrcRect
)
{
This
->
overlay_srcrect
=
*
SrcRect
;
}
else
{
This
->
overlay_srcrect
.
left
=
0
;
This
->
overlay_srcrect
.
top
=
0
;
This
->
overlay_srcrect
.
right
=
This
->
currentDesc
.
Width
;
This
->
overlay_srcrect
.
bottom
=
This
->
currentDesc
.
Height
;
}
if
(
DstRect
)
{
This
->
overlay_destrect
=
*
DstRect
;
}
else
{
This
->
overlay_destrect
.
left
=
0
;
This
->
overlay_destrect
.
top
=
0
;
This
->
overlay_destrect
.
right
=
Dst
?
Dst
->
currentDesc
.
Width
:
0
;
This
->
overlay_destrect
.
bottom
=
Dst
?
Dst
->
currentDesc
.
Height
:
0
;
}
if
(
Flags
&
WINEDDOVER_SHOW
)
{
This
->
overlay_dest
=
Dst
;
}
else
if
(
Flags
&
WINEDDOVER_HIDE
)
{
/* tests show that the rectangles are erased on hide */
This
->
overlay_srcrect
.
left
=
0
;
This
->
overlay_srcrect
.
top
=
0
;
This
->
overlay_srcrect
.
right
=
0
;
This
->
overlay_srcrect
.
bottom
=
0
;
This
->
overlay_destrect
.
left
=
0
;
This
->
overlay_destrect
.
top
=
0
;
This
->
overlay_destrect
.
right
=
0
;
This
->
overlay_destrect
.
bottom
=
0
;
This
->
overlay_dest
=
NULL
;
}
return
WINED3D_OK
;
...
...
dlls/wined3d/wined3d_private.h
View file @
e795d842
...
...
@@ -1326,6 +1326,11 @@ struct IWineD3DSurfaceImpl
/* DirectDraw clippers */
IWineD3DClipper
*
clipper
;
/* DirectDraw Overlay handling */
RECT
overlay_srcrect
;
RECT
overlay_destrect
;
IWineD3DSurfaceImpl
*
overlay_dest
;
};
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
...
...
include/wine/wined3d_interface.h
View file @
e795d842
...
...
@@ -80,6 +80,7 @@ struct IWineD3DSurface;
#define WINEDDERR_SURFACEBUSY MAKE_WINED3DHRESULT(430)
#define WINEDDERR_INVALIDRECT MAKE_WINED3DHRESULT(150)
#define WINEDDERR_NOCLIPLIST MAKE_WINED3DHRESULT(205)
#define WINEDDERR_OVERLAYNOTVISIBLE MAKE_WINED3DHRESULT(577)
#define WINED3DOK_NOAUTOGEN MAKE_WINED3DSTATUS(2159)
/*****************************************************************************
...
...
include/wine/wined3d_types.h
View file @
e795d842
...
...
@@ -1803,4 +1803,28 @@ typedef struct _WINEDDOVERLAYFX
#define WINEDDFLIP_INTERVAL3 0x03000000
#define WINEDDFLIP_INTERVAL4 0x04000000
#define WINEDDOVER_ALPHADEST 0x00000001
#define WINEDDOVER_ALPHADESTCONSTOVERRIDE 0x00000002
#define WINEDDOVER_ALPHADESTNEG 0x00000004
#define WINEDDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008
#define WINEDDOVER_ALPHAEDGEBLEND 0x00000010
#define WINEDDOVER_ALPHASRC 0x00000020
#define WINEDDOVER_ALPHASRCCONSTOVERRIDE 0x00000040
#define WINEDDOVER_ALPHASRCNEG 0x00000080
#define WINEDDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100
#define WINEDDOVER_HIDE 0x00000200
#define WINEDDOVER_KEYDEST 0x00000400
#define WINEDDOVER_KEYDESTOVERRIDE 0x00000800
#define WINEDDOVER_KEYSRC 0x00001000
#define WINEDDOVER_KEYSRCOVERRIDE 0x00002000
#define WINEDDOVER_SHOW 0x00004000
#define WINEDDOVER_ADDDIRTYRECT 0x00008000
#define WINEDDOVER_REFRESHDIRTYRECTS 0x00010000
#define WINEDDOVER_REFRESHALL 0x00020000
#define WINEDDOVER_DDFX 0x00080000
#define WINEDDOVER_AUTOFLIP 0x00100000
#define WINEDDOVER_BOB 0x00200000
#define WINEDDOVER_OVERRIDEBOBWEAVE 0x00400000
#define WINEDDOVER_INTERLEAVED 0x00800000
#endif
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