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
8903137c
Commit
8903137c
authored
Apr 13, 2000
by
Marcus Meissner
Committed by
Alexandre Julliard
Apr 13, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make DirectDraw compile with DGA2 present.
parent
af7e1ae5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
27 deletions
+41
-27
dga.c
dlls/ddraw/ddraw/dga.c
+6
-2
dga.c
dlls/ddraw/dga.c
+23
-24
dga_private.h
dlls/ddraw/dga_private.h
+9
-0
dga.c
dlls/ddraw/dpalette/dga.c
+1
-1
dga.c
dlls/ddraw/dsurface/dga.c
+2
-0
No files found.
dlls/ddraw/ddraw/dga.c
View file @
8903137c
...
...
@@ -199,6 +199,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_SetCooperativeLevel(
LPDIRECTDRAW2
iface
,
HWND
hwnd
,
DWORD
cooplevel
)
{
ICOM_THIS
(
IDirectDraw2Impl
,
iface
);
DDPRIVATE
(
This
);
HRESULT
ret
;
int
evbase
,
erbase
;
...
...
@@ -223,8 +224,9 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_SetCooperativeLevel(
#endif
#ifdef HAVE_LIBXXF86DGA2
static
void
_DGA_Initialize_FrameBuffer
(
IDirectDrawImpl
*
This
,
int
mode
)
{
void
_DGA_Initialize_FrameBuffer
(
IDirectDrawImpl
*
This
,
int
mode
)
{
DDPIXELFORMAT
*
pf
=
&
(
This
->
d
.
directdraw_pixelformat
);
DDPRIVATE
(
This
);
/* Now, get the device / mode description */
ddpriv
->
dev
=
TSXDGASetMode
(
display
,
DefaultScreen
(
display
),
mode
);
...
...
@@ -513,6 +515,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_RestoreDisplayMode(LPDIRECTDRAW2 ifac
static
ULONG
WINAPI
DGA_IDirectDraw2Impl_Release
(
LPDIRECTDRAW2
iface
)
{
ICOM_THIS
(
IDirectDraw2Impl
,
iface
);
DDPRIVATE
(
This
);
TRACE
(
"(%p)->() decrementing from %lu.
\n
"
,
This
,
This
->
ref
);
if
(
!--
(
This
->
ref
))
{
...
...
@@ -524,7 +527,7 @@ static ULONG WINAPI DGA_IDirectDraw2Impl_Release(LPDIRECTDRAW2 iface) {
TSXDGASetMode
(
display
,
DefaultScreen
(
display
),
0
);
/* Set the input handling back to absolute */
X11DRV_EVENT_SetInputMethod
(
X11DRV_INPUT_ABSOLUTE
);
/*X11DRV_EVENT_SetInputMethod(X11DRV_INPUT_ABSOLUTE);*/
/* Remove the handling of DGA2 events */
X11DRV_EVENT_SetDGAStatus
(
0
,
-
1
);
...
...
@@ -609,6 +612,7 @@ static HRESULT WINAPI DGA_IDirectDraw2Impl_EnumDisplayModes(
)
{
ICOM_THIS
(
IDirectDraw2Impl
,
iface
);
DDSURFACEDESC
ddsfd
;
DDPRIVATE
(
This
);
static
struct
{
int
w
,
h
;
}
modes
[
5
]
=
{
/* some usual modes */
...
...
dlls/ddraw/dga.c
View file @
8903137c
...
...
@@ -200,30 +200,29 @@ DGA_Create( LPDIRECTDRAW *lplpDD ) {
dgpriv
->
modes
=
modes
;
dgpriv
->
num_modes
=
num_modes
;
TRACE
(
"Available modes :
\n
"
);
for
(
i
=
0
;
i
<
num_modes
;
i
++
)
{
if
(
TRACE_ON
(
ddraw
))
{
DPRINTF
(
" %d) - %s (FB: %dx%d / VP: %dx%d) - depth %d -"
,
modes
[
i
].
num
,
modes
[
i
].
name
,
modes
[
i
].
imageWidth
,
modes
[
i
].
imageHeight
,
modes
[
i
].
viewportWidth
,
modes
[
i
].
viewportHeight
,
modes
[
i
].
depth
);
TRACE
(
"Available modes :
\n
"
);
for
(
i
=
0
;
i
<
num_modes
;
i
++
)
{
if
(
TRACE_ON
(
ddraw
))
{
DPRINTF
(
" %d) - %s (FB: %dx%d / VP: %dx%d) - depth %d -"
,
modes
[
i
].
num
,
modes
[
i
].
name
,
modes
[
i
].
imageWidth
,
modes
[
i
].
imageHeight
,
modes
[
i
].
viewportWidth
,
modes
[
i
].
viewportHeight
,
modes
[
i
].
depth
);
#define XX(x) if (modes[i].flags & x) DPRINTF(" "#x" ");
XX
(
XDGAConcurrentAccess
);
XX
(
XDGASolidFillRect
);
XX
(
XDGABlitRect
);
XX
(
XDGABlitTransRect
);
XX
(
XDGAPixmap
);
XX
(
XDGAConcurrentAccess
);
XX
(
XDGASolidFillRect
);
XX
(
XDGABlitRect
);
XX
(
XDGABlitTransRect
);
XX
(
XDGAPixmap
);
#undef XX
DPRINTF
(
"
\n
"
);
}
if
((
MONITOR_GetHeight
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
viewportHeight
)
&&
(
MONITOR_GetWidth
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
viewportWidth
)
&&
(
MONITOR_GetDepth
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
depth
)
)
{
mode_to_use
=
modes
[
i
].
num
;
}
DPRINTF
(
"
\n
"
);
}
if
((
MONITOR_GetHeight
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
viewportHeight
)
&&
(
MONITOR_GetWidth
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
viewportWidth
)
&&
(
MONITOR_GetDepth
(
&
MONITOR_PrimaryMonitor
)
==
modes
[
i
].
depth
)
)
{
mode_to_use
=
modes
[
i
].
num
;
}
}
if
(
mode_to_use
==
0
)
{
...
...
@@ -234,9 +233,9 @@ DGA_Create( LPDIRECTDRAW *lplpDD ) {
}
/* Initialize the frame buffer */
_DGA_Initialize_FrameBuffer
(
*
i
lplpDD
,
mode_to_use
);
_DGA_Initialize_FrameBuffer
(
*
lplpDD
,
mode_to_use
);
/* Set the input handling for relative mouse movements */
X11DRV_EVENT_SetInputMehod
(
X11DRV_INPUT_RELATIVE
);
/*X11DRV_EVENT_SetInputMehod(X11DRV_INPUT_RELATIVE);*/
}
#endif
/* defined(HAVE_LIBXXF86DGA2) */
return
DD_OK
;
...
...
dlls/ddraw/dga_private.h
View file @
8903137c
...
...
@@ -29,6 +29,11 @@ typedef struct dga_dd_private {
DWORD
fb_memsize
;
/* total memory on the card */
DWORD
vpmask
;
/* viewports in use flag bitmap */
DWORD
version
;
/* DGA version */
#ifdef HAVE_LIBXXF86DGA2
XDGADevice
*
dev
;
XDGAMode
*
modes
;
int
num_modes
;
#endif
}
dga_dd_private
;
typedef
x11_dp_private
dga_dp_private
;
/* reuse X11 palette stuff */
...
...
@@ -37,4 +42,8 @@ typedef struct dga_ds_private {
DWORD
fb_height
;
}
dga_ds_private
;
#ifdef HAVE_LIBXXF86DGA2
extern
void
_DGA_Initialize_FrameBuffer
(
IDirectDrawImpl
*
This
,
int
mode
);
#endif
#endif
/* __WINE_DDRAW_DGA_PRIVATE_H */
dlls/ddraw/dpalette/dga.c
View file @
8903137c
...
...
@@ -26,6 +26,7 @@ HRESULT WINAPI DGA_IDirectDrawPaletteImpl_SetEntries(
)
{
ICOM_THIS
(
IDirectDrawPaletteImpl
,
iface
);
DPPRIVATE
(
This
);
DDPRIVATE
(
This
->
ddraw
);
XColor
xc
;
Colormap
cm
;
int
i
;
...
...
@@ -56,7 +57,6 @@ HRESULT WINAPI DGA_IDirectDrawPaletteImpl_SetEntries(
}
#ifdef HAVE_LIBXXF86DGA2
if
(
ddpriv
->
version
==
2
)
{
DDPRIVATE
(
This
->
ddraw
);
TSXDGAInstallColormap
(
display
,
DefaultScreen
(
display
),
dppriv
->
cm
);
}
else
#endif
/* defined(HAVE_LIBXXF86DGA2) */
...
...
dlls/ddraw/dsurface/dga.c
View file @
8903137c
...
...
@@ -76,6 +76,7 @@ HRESULT WINAPI DGA2_IDirectDrawSurface4Impl_Flip(
ICOM_THIS
(
IDirectDrawSurface4Impl
,
iface
);
IDirectDrawSurface4Impl
*
iflipto
=
(
IDirectDrawSurface4Impl
*
)
flipto
;
DWORD
xheight
;
DSPRIVATE
(
This
);
dga_ds_private
*
fspriv
;
LPBYTE
surf
;
...
...
@@ -112,6 +113,7 @@ HRESULT WINAPI DGA_IDirectDrawSurface4Impl_SetPalette(
LPDIRECTDRAWSURFACE4
iface
,
LPDIRECTDRAWPALETTE
pal
)
{
ICOM_THIS
(
IDirectDrawSurface4Impl
,
iface
);
DDPRIVATE
(
This
->
s
.
ddraw
);
IDirectDrawPaletteImpl
*
ipal
=
(
IDirectDrawPaletteImpl
*
)
pal
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ipal
);
...
...
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