Commit 1cd70566 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

DirectDraw status updated.

Use cooperative window for drawing in xlib implementation if possible. Slightly restructured IDirectDrawSurface::Blt so it doesn't crash.
parent 6c6e3e48
...@@ -23,13 +23,6 @@ Problems of the implementation using XFree86-DGA: ...@@ -23,13 +23,6 @@ Problems of the implementation using XFree86-DGA:
framebuffer into the addressspace of the process. framebuffer into the addressspace of the process.
- Blocks all other X windowed applications. - Blocks all other X windowed applications.
TODO:
- Add more implementations of the DirectDraw API.
Primary candidate is a raw Xlib implementation (one with/one without
XShm extension).
An additional layer (basically a HAL) will be required to decide on
case-by-case basis which implementation to use.
Status: Status:
- Diablo [640x480x8]: - Diablo [640x480x8]:
The movies play with speed comparable to the MS DDRAW one. The movies play with speed comparable to the MS DDRAW one.
...@@ -49,12 +42,10 @@ Status: ...@@ -49,12 +42,10 @@ Status:
but it crashes as soon as you arrive at Blue Point Station... but it crashes as soon as you arrive at Blue Point Station...
- Monkey Island 3 [640x480x8]: - Monkey Island 3 [640x480x8]:
Goes to the easy/hard selection screen, then hangs due to multithreaded WINE-CVS-981116:
windows-messagehandling problems. Works, using DGA and Xlib. (Mousecontrol is a bit off in windowed mode.)
- DiscWorld 2 [640x480x8]: - DiscWorld 2 [640x480x8]:
[Crashes with 'cli' in WINE released version. Yes. Privileged instructions
in 32bit code. Will they ever learn...]
Plays through nearly all intro movies. Sound and animation skip a lot of Plays through nearly all intro movies. Sound and animation skip a lot of
stuff (possible DirectSound asynchronization problem). stuff (possible DirectSound asynchronization problem).
...@@ -68,7 +59,5 @@ Status: ...@@ -68,7 +59,5 @@ Status:
DirectInput. DirectInput.
- WingCommander Prophecy Demo (using software renderer) [640x480x16]: - WingCommander Prophecy Demo (using software renderer) [640x480x16]:
[Crashes with an invalid opcode (outb, probably to test for 3dFX) in the
WINE release version.]
Plays trailer, hangs in selection screen (no keyboard input, DirectInput Plays trailer, hangs in selection screen (no keyboard input, DirectInput
problem). problem).
...@@ -148,7 +148,7 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header, ...@@ -148,7 +148,7 @@ HBITMAP16 WINAPI WinGCreateBitmap16(HDC16 winDC, BITMAPINFO *header,
WORD sel = 0; WORD sel = 0;
TSXShmAttach(display, &p->si); TSXShmAttach(display, &p->si);
bmpObjPtr->pixmap = XShmCreatePixmap(display, rootWindow, bmpObjPtr->pixmap = TSXShmCreatePixmap(display, rootWindow,
p->si.shmaddr, &p->si, bmpObjPtr->bitmap.bmWidth, p->si.shmaddr, &p->si, bmpObjPtr->bitmap.bmWidth,
bmpObjPtr->bitmap.bmHeight, bmpi->biBitCount ); bmpObjPtr->bitmap.bmHeight, bmpi->biBitCount );
if( bmpObjPtr->pixmap ) if( bmpObjPtr->pixmap )
......
...@@ -935,34 +935,37 @@ struct IDirectDraw { ...@@ -935,34 +935,37 @@ struct IDirectDraw {
typedef struct IDirectDraw2_VTable typedef struct IDirectDraw2_VTable
{ {
/*** IUnknown methods ***/ /*** IUnknown methods ***/
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; /*00*/ STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
STDMETHOD_(ULONG,AddRef) (THIS) PURE; /*04*/ STDMETHOD_(ULONG,AddRef) (THIS) PURE;
STDMETHOD_(ULONG,Release) (THIS) PURE; /*08*/ STDMETHOD_(ULONG,Release) (THIS) PURE;
/*** IDirectDraw methods ***/ /*** IDirectDraw methods ***/
STDMETHOD(Compact)(THIS) PURE; /*0C*/ STDMETHOD(Compact)(THIS) PURE;
STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; /*10*/ STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE;
STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; /*14*/ STDMETHOD(CreatePalette)(THIS_ DWORD,LPPALETTEENTRY,
STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR *) PURE;
IUnknown FAR *) PURE; /*18*/ STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC,LPDIRECTDRAWSURFACE
STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE;
FAR * ) PURE; /*1C*/ STDMETHOD(DuplicateSurface)(THIS_ LPDIRECTDRAWSURFACE,
STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; LPDIRECTDRAWSURFACE FAR * ) PURE;
STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; /*20*/ STDMETHOD(EnumDisplayModes)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,
STDMETHOD(FlipToGDISurface)(THIS) PURE; LPDDENUMMODESCALLBACK ) PURE;
STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; /*24*/ STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,
STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; LPDDENUMSURFACESCALLBACK ) PURE;
STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; /*28*/ STDMETHOD(FlipToGDISurface)(THIS) PURE;
STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; /*2C*/ STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE;
STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; /*30*/ STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE;
STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; /*34*/ STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE;
STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL32* ) PURE; /*38*/ STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE;
STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; /*3C*/ STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE;
STDMETHOD(RestoreDisplayMode)(THIS) PURE; /*40*/ STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE;
STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE; /*44*/ STDMETHOD(GetVerticalBlankStatus)(THIS_ BOOL32* ) PURE;
STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD, DWORD, DWORD) PURE; /*48*/ STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE;
STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE; /*4C*/ STDMETHOD(RestoreDisplayMode)(THIS) PURE;
/*50*/ STDMETHOD(SetCooperativeLevel)(THIS_ HWND32, DWORD) PURE;
/*54*/ STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD, DWORD, DWORD, DWORD) PURE;
/*58*/ STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE32 ) PURE;
/*** Added in the v2 interface ***/ /*** Added in the v2 interface ***/
STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE; /*5C*/ STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE;
} IDirectDraw2_VTable,*LPDIRECTDRAW2_VTABLE; } IDirectDraw2_VTable,*LPDIRECTDRAW2_VTABLE;
/* MUST HAVE THE SAME LAYOUT AS struct IDirectDraw */ /* MUST HAVE THE SAME LAYOUT AS struct IDirectDraw */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment