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
6fb7ed8f
Commit
6fb7ed8f
authored
Jan 02, 2003
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jan 02, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added 'blt' and 'bltfast' override functions.
parent
ce3d9688
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
8 deletions
+48
-8
mesa.c
dlls/ddraw/d3ddevice/mesa.c
+33
-5
d3dtexture.c
dlls/ddraw/d3dtexture.c
+2
-2
ddraw_private.h
dlls/ddraw/ddraw_private.h
+3
-1
dib.c
dlls/ddraw/dsurface/dib.c
+10
-0
No files found.
dlls/ddraw/d3ddevice/mesa.c
View file @
6fb7ed8f
...
...
@@ -1685,14 +1685,16 @@ static HRESULT d3ddevice_clear(IDirect3DDeviceImpl *This,
TRACE
(
"(%p)->(%08lx,%p,%08lx,%08lx,%f,%08lx)
\n
"
,
This
,
dwCount
,
lpRects
,
dwFlags
,
dwColor
,
dvZ
,
dwStencil
);
if
(
TRACE_ON
(
ddraw
))
{
int
i
;
TRACE
(
" rectangles :
\n
"
);
for
(
i
=
0
;
i
<
dwCount
;
i
++
)
{
TRACE
(
" - %ld x %ld %ld x %ld
\n
"
,
lpRects
[
i
].
u1
.
x1
,
lpRects
[
i
].
u2
.
y1
,
lpRects
[
i
].
u3
.
x2
,
lpRects
[
i
].
u4
.
y2
);
if
(
dwCount
>
0
)
{
int
i
;
TRACE
(
" rectangles :
\n
"
);
for
(
i
=
0
;
i
<
dwCount
;
i
++
)
{
TRACE
(
" - %ld x %ld %ld x %ld
\n
"
,
lpRects
[
i
].
u1
.
x1
,
lpRects
[
i
].
u2
.
y1
,
lpRects
[
i
].
u3
.
x2
,
lpRects
[
i
].
u4
.
y2
);
}
}
}
if
(
dwCount
!=
1
)
{
if
(
dwCount
>
1
)
{
WARN
(
" Warning, this function only for now clears the whole screen...
\n
"
);
}
...
...
@@ -1745,6 +1747,29 @@ static HRESULT d3ddevice_clear(IDirect3DDeviceImpl *This,
return
DD_OK
;
}
HRESULT
d3ddevice_blt
(
IDirectDrawSurfaceImpl
*
This
,
LPRECT
rdst
,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
dwFlags
,
LPDDBLTFX
lpbltfx
)
{
if
(
dwFlags
&
DDBLT_COLORFILL
)
{
/* This is easy to handle for the D3D Device... */
DWORD
color
=
lpbltfx
->
u5
.
dwFillColor
;
TRACE
(
" executing D3D Device override.
\n
"
);
d3ddevice_clear
(
This
->
d3ddevice
,
0
,
NULL
,
D3DCLEAR_TARGET
,
color
,
0
.
0
,
0x00000000
);
return
DD_OK
;
}
return
DDERR_INVALIDPARAMS
;
}
HRESULT
d3ddevice_bltfast
(
IDirectDrawSurfaceImpl
*
This
,
DWORD
dstx
,
DWORD
dsty
,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
trans
)
{
return
DDERR_INVALIDPARAMS
;
}
/* TODO for both these functions :
- change / restore OpenGL parameters for pictures transfers in case they are ever modified
...
...
@@ -1916,6 +1941,9 @@ d3ddevice_create(IDirect3DDeviceImpl **obj, IDirect3DImpl *d3d, IDirectDrawSurfa
/* Override the Lock / Unlock function for all these surfaces */
surf
->
lock_update
=
d3ddevice_lock_update
;
surf
->
unlock_update
=
d3ddevice_unlock_update
;
/* And install also the blt / bltfast overrides */
surf
->
aux_blt
=
d3ddevice_blt
;
surf
->
aux_bltfast
=
d3ddevice_bltfast
;
}
surf
->
d3ddevice
=
object
;
}
...
...
dlls/ddraw/d3dtexture.c
View file @
6fb7ed8f
...
...
@@ -60,7 +60,7 @@ static void snoop_texture(IDirectDrawSurfaceImpl *This) {
/*******************************************************************************
* IDirectSurface callback methods
*/
HRESULT
WINAPI
gltex_setcolorkey_cb
(
IDirectDrawSurfaceImpl
*
texture
,
DWORD
dwFlags
,
LPDDCOLORKEY
ckey
)
HRESULT
gltex_setcolorkey_cb
(
IDirectDrawSurfaceImpl
*
texture
,
DWORD
dwFlags
,
LPDDCOLORKEY
ckey
)
{
DDSURFACEDESC
*
tex_d
;
GLuint
current_texture
;
...
...
@@ -689,7 +689,7 @@ HRESULT d3dtexture_create(IDirect3DImpl *d3d, IDirectDrawSurfaceImpl *surf, BOOL
surf
->
lock_update
=
gltex_lock_update
;
surf
->
unlock_update
=
gltex_unlock_update
;
surf
->
tex_private
=
private
;
surf
->
SetColorK
ey_cb
=
gltex_setcolorkey_cb
;
surf
->
aux_setcolork
ey_cb
=
gltex_setcolorkey_cb
;
ENTER_GL
();
if
(
surf
->
mipmap_level
==
0
)
{
...
...
dlls/ddraw/ddraw_private.h
View file @
6fb7ed8f
...
...
@@ -294,7 +294,9 @@ struct IDirectDrawSurfaceImpl
void
(
*
aux_release
)(
LPVOID
ctx
,
LPVOID
data
);
BOOL
(
*
aux_flip
)(
LPVOID
ctx
,
LPVOID
data
);
void
(
*
aux_unlock
)(
LPVOID
ctx
,
LPVOID
data
,
LPRECT
lpRect
);
HRESULT
(
WINAPI
*
SetColorKey_cb
)(
struct
IDirectDrawSurfaceImpl
*
texture
,
DWORD
dwFlags
,
LPDDCOLORKEY
ckey
)
;
HRESULT
(
*
aux_blt
)(
struct
IDirectDrawSurfaceImpl
*
This
,
LPRECT
rdst
,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
dwFlags
,
LPDDBLTFX
lpbltfx
);
HRESULT
(
*
aux_bltfast
)(
struct
IDirectDrawSurfaceImpl
*
This
,
DWORD
dstx
,
DWORD
dsty
,
LPDIRECTDRAWSURFACE7
src
,
LPRECT
rsrc
,
DWORD
trans
);
HRESULT
(
*
aux_setcolorkey_cb
)(
struct
IDirectDrawSurfaceImpl
*
texture
,
DWORD
dwFlags
,
LPDDCOLORKEY
ckey
);
/* This is to get the D3DDevice object associated to this surface */
struct
IDirect3DDeviceImpl
*
d3ddevice
;
/* This is for texture */
...
...
dlls/ddraw/dsurface/dib.c
View file @
6fb7ed8f
...
...
@@ -365,6 +365,11 @@ DIB_DirectDrawSurface_Blt(LPDIRECTDRAWSURFACE7 iface, LPRECT rdst,
}
}
/* First, check if the possible override function handles this case */
if
(
This
->
aux_blt
!=
NULL
)
{
if
(
This
->
aux_blt
(
This
,
rdst
,
src
,
rsrc
,
dwFlags
,
lpbltfx
)
==
DD_OK
)
return
DD_OK
;
}
DD_STRUCT_INIT
(
&
ddesc
);
DD_STRUCT_INIT
(
&
sdesc
);
...
...
@@ -814,6 +819,11 @@ DIB_DirectDrawSurface_BltFast(LPDIRECTDRAWSURFACE7 iface, DWORD dstx,
FIXME
(
" srcrect: NULL
\n
"
);
}
/* First, check if the possible override function handles this case */
if
(
This
->
aux_bltfast
!=
NULL
)
{
if
(
This
->
aux_bltfast
(
This
,
dstx
,
dsty
,
src
,
rsrc
,
trans
)
==
DD_OK
)
return
DD_OK
;
}
/* We need to lock the surfaces, or we won't get refreshes when done. */
sdesc
.
dwSize
=
sizeof
(
sdesc
);
IDirectDrawSurface7_Lock
(
src
,
NULL
,
&
sdesc
,
DDLOCK_READONLY
,
0
);
...
...
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