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
c5312596
Commit
c5312596
authored
Jan 23, 1999
by
Lionel Ulmer
Committed by
Alexandre Julliard
Jan 23, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- corrected bug in Z Buffer allocation
- put VIDEOMEMORY flag for all primary surfaces - put something in a surface after a ReleaseDC
parent
65e95f33
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
5 deletions
+25
-5
ddraw.c
graphics/ddraw.c
+25
-5
No files found.
graphics/ddraw.c
View file @
c5312596
...
...
@@ -988,6 +988,8 @@ static HRESULT WINAPI IDirectDrawSurface3_AddAttachedSurface(
)
{
FIXME
(
ddraw
,
"(%p)->(%p),stub!
\n
"
,
this
,
surf
);
this
->
lpvtbl
->
fnAddRef
(
this
);
/* This hack will be enough for the moment */
if
(
this
->
s
.
backbuffer
==
NULL
)
this
->
s
.
backbuffer
=
surf
;
...
...
@@ -1001,8 +1003,22 @@ static HRESULT WINAPI IDirectDrawSurface3_GetDC(LPDIRECTDRAWSURFACE3 this,HDC32*
}
static
HRESULT
WINAPI
IDirectDrawSurface3_ReleaseDC
(
LPDIRECTDRAWSURFACE3
this
,
HDC32
hdc
)
{
DDSURFACEDESC
desc
;
DWORD
x
,
y
;
FIXME
(
ddraw
,
"(%p)->(0x%08lx),stub!
\n
"
,
this
,(
long
)
hdc
);
EndPaint32
(
this
->
s
.
ddraw
->
d
.
window
,
&
this
->
s
.
ddraw
->
d
.
ps
);
/* Well, as what the application did paint in this DC is NOT saved in the surface,
I fill it with 'dummy' values to have something on the screen */
this
->
lpvtbl
->
fnLock
(
this
,
NULL
,
&
desc
,
0
,
0
);
for
(
y
=
0
;
y
<
desc
.
dwHeight
;
y
++
)
{
for
(
x
=
0
;
x
<
desc
.
dwWidth
;
x
++
)
{
((
unsigned
char
*
)
desc
.
y
.
lpSurface
)[
x
+
y
*
desc
.
dwWidth
]
=
(
unsigned
int
)
this
+
x
+
y
;
}
}
this
->
lpvtbl
->
fnUnlock
(
this
,
NULL
);
return
DD_OK
;
}
...
...
@@ -1933,7 +1949,8 @@ static HRESULT common_off_screen_CreateSurface(LPDIRECTDRAW2 this,
if
(
lpddsd
->
dwFlags
&
DDSD_ZBUFFERBITDEPTH
)
{
/* This is a Z Buffer */
bpp
=
lpddsd
->
x
.
dwZBufferBitDepth
;
TRACE
(
ddraw
,
"Creating Z-Buffer of %ld bit depth
\n
"
,
lpddsd
->
x
.
dwZBufferBitDepth
);
bpp
=
lpddsd
->
x
.
dwZBufferBitDepth
/
8
;
}
else
{
/* This is a standard image */
if
(
!
(
lpddsd
->
dwFlags
&
DDSD_PIXELFORMAT
))
{
...
...
@@ -1946,13 +1963,13 @@ static HRESULT common_off_screen_CreateSurface(LPDIRECTDRAW2 this,
_dump_pixelformat
(
&
(
lpddsd
->
ddpfPixelFormat
));
}
}
}
if
(
lpddsd
->
ddpfPixelFormat
.
dwFlags
&
DDPF_PALETTEINDEXED8
)
{
bpp
=
1
;
}
else
{
bpp
=
lpddsd
->
ddpfPixelFormat
.
x
.
dwRGBBitCount
/
8
;
}
}
/* Copy the surface description */
lpdsf
->
s
.
surface_desc
=
*
lpddsd
;
...
...
@@ -2018,7 +2035,8 @@ static HRESULT WINAPI DGA_IDirectDraw2_CreateSurface(
(
*
lpdsf
)
->
s
.
surface_desc
.
dwFlags
|=
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PITCH
|
DDSD_LPSURFACE
;
(
*
lpdsf
)
->
s
.
surface_desc
.
dwWidth
=
this
->
d
.
width
;
(
*
lpdsf
)
->
s
.
surface_desc
.
dwHeight
=
this
->
d
.
height
;
(
*
lpdsf
)
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VISIBLE
;
/* We put our surface always in video memory */
(
*
lpdsf
)
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VISIBLE
|
DDSCAPS_VIDEOMEMORY
;
_getpixelformat
(
this
,
&
((
*
lpdsf
)
->
s
.
surface_desc
.
ddpfPixelFormat
));
(
*
lpdsf
)
->
s
.
backbuffer
=
NULL
;
...
...
@@ -2055,6 +2073,7 @@ static HRESULT WINAPI DGA_IDirectDraw2_CreateSurface(
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_BACKBUFFER
;
back
->
s
.
surface_desc
.
dwFlags
&=
~
DDSD_BACKBUFFERCOUNT
;
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
&=
~
DDSCAPS_VISIBLE
;
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VIDEOMEMORY
;
}
}
else
{
/* There is no DGA-specific code here...
...
...
@@ -2184,7 +2203,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
(
*
lpdsf
)
->
s
.
surface_desc
.
dwFlags
|=
DDSD_WIDTH
|
DDSD_HEIGHT
|
DDSD_PITCH
|
DDSD_LPSURFACE
;
(
*
lpdsf
)
->
s
.
surface_desc
.
dwWidth
=
this
->
d
.
width
;
(
*
lpdsf
)
->
s
.
surface_desc
.
dwHeight
=
this
->
d
.
height
;
(
*
lpdsf
)
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VISIBLE
;
(
*
lpdsf
)
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VISIBLE
|
DDSCAPS_VIDEOMEMORY
;
_getpixelformat
(
this
,
&
((
*
lpdsf
)
->
s
.
surface_desc
.
ddpfPixelFormat
));
(
*
lpdsf
)
->
s
.
backbuffer
=
NULL
;
...
...
@@ -2223,6 +2242,7 @@ static HRESULT WINAPI Xlib_IDirectDraw2_CreateSurface(
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_BACKBUFFER
;
back
->
s
.
surface_desc
.
dwFlags
&=
~
DDSD_BACKBUFFERCOUNT
;
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
&=
~
DDSCAPS_VISIBLE
;
back
->
s
.
surface_desc
.
ddsCaps
.
dwCaps
|=
DDSCAPS_VIDEOMEMORY
;
}
}
else
{
/* There is no Xlib-specific code here...
...
...
@@ -2360,7 +2380,7 @@ static HRESULT WINAPI DGA_IDirectDraw_SetDisplayMode(
{
XF86VidModeModeInfo
**
all_modes
,
*
vidmode
=
NULL
;
XF86VidModeModeLine
mod_tmp
;
int
dotclock_tmp
;
/* int dotclock_tmp; */
/* save original video mode and set fullscreen if available*/
orig_mode
=
(
XF86VidModeModeInfo
*
)
malloc
(
sizeof
(
XF86VidModeModeInfo
));
...
...
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