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
5b68233d
Commit
5b68233d
authored
Sep 11, 1999
by
Lionel Ulmer
Committed by
Alexandre Julliard
Sep 11, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- fixed the creation of back-buffers in DGA mode
- added a check on the validity of the Locking rectangle - fixed the enumeration for DX-6.0
parent
62c90d60
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
16 deletions
+25
-16
ddraw.c
graphics/ddraw.c
+25
-16
No files found.
graphics/ddraw.c
View file @
5b68233d
...
...
@@ -205,7 +205,7 @@ HRESULT WINAPI DirectDrawEnumerateExA(
DPRINTF
(
"
\n
"
);
}
if
(
dwFlags
&
DDENUM_NONDISPLAYDEVICES
)
{
if
(
dwFlags
==
DDENUM_NONDISPLAYDEVICES
)
{
/* For the moment, Wine does not support any 3D only accelerators */
return
DD_OK
;
}
...
...
@@ -663,9 +663,17 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Lock(
/* If asked only for a part, change the surface pointer */
if
(
lprect
)
{
FIXM
E
(
" lprect: %dx%d-%dx%d
\n
"
,
TRAC
E
(
" lprect: %dx%d-%dx%d
\n
"
,
lprect
->
top
,
lprect
->
left
,
lprect
->
bottom
,
lprect
->
right
);
if
((
lprect
->
top
<
0
)
||
(
lprect
->
left
<
0
)
||
(
lprect
->
bottom
<
0
)
||
(
lprect
->
right
<
0
))
{
ERR
(
" Negative values in LPRECT !!!
\n
"
);
return
DDERR_INVALIDPARAMS
;
}
lpddsd
->
y
.
lpSurface
=
(
LPVOID
)
((
char
*
)
This
->
s
.
surface_desc
.
y
.
lpSurface
+
(
lprect
->
top
*
This
->
s
.
surface_desc
.
lPitch
)
+
(
lprect
->
left
*
(
This
->
s
.
surface_desc
.
ddpfPixelFormat
.
x
.
dwRGBBitCount
/
8
)));
...
...
@@ -957,7 +965,7 @@ static HRESULT _Blt_ColorFill(LPBYTE buf, int width, int height, int bpp, LONG l
case
2
:
COLORFILL_ROW
(
WORD
)
case
4
:
COLORFILL_ROW
(
DWORD
)
default:
FIXME
(
"
Stretched blit
not implemented for bpp %d!
\n
"
,
bpp
*
8
);
FIXME
(
"
Color fill
not implemented for bpp %d!
\n
"
,
bpp
*
8
);
return
DDERR_UNSUPPORTED
;
}
...
...
@@ -990,12 +998,12 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
IDirectDrawSurface4_Lock
(
iface
,
NULL
,
&
ddesc
,
0
,
0
);
if
(
TRACE_ON
(
ddraw
))
{
if
(
rdst
)
TRACE
(
"
destrect :%dx%d-%dx%d
\n
"
,
rdst
->
left
,
rdst
->
top
,
rdst
->
right
,
rdst
->
bottom
);
if
(
rsrc
)
TRACE
(
"
srcrect :%dx%d-%dx%d
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
if
(
rdst
)
TRACE
(
"
\t
destrect :%dx%d-%dx%d
\n
"
,
rdst
->
left
,
rdst
->
top
,
rdst
->
right
,
rdst
->
bottom
);
if
(
rsrc
)
TRACE
(
"
\t
srcrect :%dx%d-%dx%d
\n
"
,
rsrc
->
left
,
rsrc
->
top
,
rsrc
->
right
,
rsrc
->
bottom
);
TRACE
(
"
\t
flags: "
);
_dump_DDBLT
(
dwFlags
);
if
(
dwFlags
&
DDBLT_DDFX
)
{
TRACE
(
" blitfx:
\n
"
);
TRACE
(
"
\t
blitfx:
"
);
_dump_DDBLTFX
(
lpbltfx
->
dwDDFX
);
}
}
...
...
@@ -1121,8 +1129,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
type *s = (type *) sbuf, *d = (type *) dbuf; \
for (x = sx = 0; x < dstwidth; x++, sx += xinc) \
d[x] = s[sx >> 16]; \
break; \
}
break; }
switch
(
bpp
)
{
case
1
:
STRETCH_ROW
(
BYTE
)
...
...
@@ -1154,17 +1161,17 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
keyhigh
=
ddesc
.
ddckCKDestBlt
.
dwColorSpaceHighValue
;
}
for
(
y
=
sy
=
0
;
y
<
dstheight
;
y
++
,
sy
+=
yinc
)
{
sbuf
=
sbase
+
(
sy
>>
16
)
*
sdesc
.
lPitch
;
#define COPYROW_COLORKEY(type) { \
type *s = (type *) sbuf, *d = (type *) dbuf, tmp; \
for (x = sx = 0; x < dstwidth; x++, sx += xinc) { \
tmp = s[sx >> 16]; \
if (tmp < keylow || tmp > keyhigh) d[x] = tmp; \
} \
break; \
}
for
(
y
=
sy
=
0
;
y
<
dstheight
;
y
++
,
sy
+=
yinc
)
{
sbuf
=
sbase
+
(
sy
>>
16
)
*
sdesc
.
lPitch
;
break; }
switch
(
bpp
)
{
case
1
:
COPYROW_COLORKEY
(
BYTE
)
...
...
@@ -1186,7 +1193,7 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_Blt(
}
}
error:
error:
if
(
dwFlags
&&
FIXME_ON
(
ddraw
))
{
FIXME
(
"
\t
Unsupported flags: "
);
...
...
@@ -2904,9 +2911,11 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
if
(
lpddsd
->
dwFlags
&
DDSD_BACKBUFFERCOUNT
)
{
IDirectDrawSurface4Impl
*
back
;
int
bbc
;
for
(
bbc
=
lpddsd
->
dwBackBufferCount
;
bbc
--
;)
{
int
i
;
for
(
i
=
lpddsd
->
dwBackBufferCount
;
i
--
;)
{
back
=
(
IDirectDrawSurface4Impl
*
)
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
...
...
@@ -2918,7 +2927,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_CreateSurface(
for
(
i
=
0
;
i
<
32
;
i
++
)
if
(
!
(
This
->
e
.
dga
.
vpmask
&
(
1
<<
i
)))
break
;
TRACE
(
"using viewport %d for backbuffer
\n
"
,
i
);
TRACE
(
"using viewport %d for backbuffer
%d
\n
"
,
i
,
bbc
);
/* if i == 32 or maximum ... return error */
This
->
e
.
dga
.
vpmask
|=
(
1
<<
i
);
back
->
t
.
dga
.
fb_height
=
i
*
fbheight
;
...
...
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