aboutsummaryrefslogtreecommitdiff
path: root/xorg-server
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c3
-rw-r--r--xorg-server/hw/xwin/makefile34
-rw-r--r--xorg-server/hw/xwin/win.h8
-rw-r--r--xorg-server/hw/xwin/winpfbdd.c1
-rw-r--r--xorg-server/hw/xwin/winsetsp.c13
-rw-r--r--xorg-server/hw/xwin/winshaddd.c19
-rw-r--r--xorg-server/hw/xwin/winwndproc.c1
7 files changed, 36 insertions, 43 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 8520e2375..d05a76320 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -807,6 +807,9 @@ winUseMsg (void)
"\t\t1 - Shadow GDI\n"
"\t\t2 - Shadow DirectDraw\n"
"\t\t4 - Shadow DirectDraw4 Non-Locking\n"
+#ifdef XWIN_PRIMARYFB
+ "\t\t8 - Primary DirectDraw\n"
+#endif
#ifdef XWIN_NATIVEGDI
"\t\t16 - Native GDI - experimental\n"
#endif
diff --git a/xorg-server/hw/xwin/makefile b/xorg-server/hw/xwin/makefile
index ef0b32291..60708a16b 100644
--- a/xorg-server/hw/xwin/makefile
+++ b/xorg-server/hw/xwin/makefile
@@ -26,25 +26,28 @@ DEFINES += XWIN_MULTIWINDOW
# winwindowswm.c
#DEFINES += XWIN_MULTIWINDOWEXTWM
-SRCS_NATIVEGDI = \
- winclip.c \
- winfillsp.c \
- winfont.c \
- wingc.c \
- wingetsp.c \
- winnativegdi.c \
- winpixmap.c \
- winpolyline.c \
- winrop.c \
- winsetsp.c
-DEFINES += XWIN_NATIVEGDI
-
+#SRCS_NATIVEGDI = \
+# winclip.c \
+# winfillsp.c \
+# winfont.c \
+# wingc.c \
+# wingetsp.c \
+# winnativegdi.c \
+# winpixmap.c \
+# winpolyline.c \
+# winrop.c \
+# winsetsp.c
+#DEFINES += XWIN_NATIVEGDI
+
+#SRCS_PRIMARYFB = \
+# winpfbdd.c
+#DEFINES += XWIN_PRIMARYFB
SRCS_RANDR = \
winrandr.c
DEFINES += XWIN_RANDR RELOCATE_PROJECTROOT
-CSRCS = InitInput.c \
+CSRCS = InitInput.c \
InitOutput.c \
winallpriv.c \
winauth.c \
@@ -83,7 +86,8 @@ CSRCS = InitInput.c \
$(SRCS_CLIPBOARD) \
$(SRCS_MULTIWINDOW) \
$(SRCS_MULTIWINDOWEXTWM) \
- $(SRCS_NATIVEGDI)
+ $(SRCS_NATIVEGDI) \
+ $(SRCS_PRIMARYFB)
DEFINES += YY_NO_UNISTD_H
diff --git a/xorg-server/hw/xwin/win.h b/xorg-server/hw/xwin/win.h
index 90c498f81..c60dd9fe0 100644
--- a/xorg-server/hw/xwin/win.h
+++ b/xorg-server/hw/xwin/win.h
@@ -461,17 +461,19 @@ typedef struct _winPrivScreenRec
/* Privates used by shadow fb and primary fb DirectDraw servers */
LPDIRECTDRAW pdd;
- LPDIRECTDRAWSURFACE2 pddsPrimary;
+ LPDIRECTDRAWSURFACE pddsPrimary;
LPDIRECTDRAW2 pdd2;
/* Privates used by shadow fb DirectDraw server */
- LPDIRECTDRAWSURFACE2 pddsShadow;
+ LPDIRECTDRAWSURFACE pddsShadow;
LPDDSURFACEDESC pddsdShadow;
+#ifdef XWIN_PRIMARYFB
/* Privates used by primary fb DirectDraw server */
- LPDIRECTDRAWSURFACE2 pddsOffscreen;
+ LPDIRECTDRAWSURFACE pddsOffscreen;
LPDDSURFACEDESC pddsdOffscreen;
LPDDSURFACEDESC pddsdPrimary;
+#endif
/* Privates used by shadow fb DirectDraw Nonlocking server */
LPDIRECTDRAW4 pdd4;
diff --git a/xorg-server/hw/xwin/winpfbdd.c b/xorg-server/hw/xwin/winpfbdd.c
index 6c0c2bffd..63a16b8b3 100644
--- a/xorg-server/hw/xwin/winpfbdd.c
+++ b/xorg-server/hw/xwin/winpfbdd.c
@@ -41,7 +41,6 @@
* External symbols
*/
-extern const GUID _IID_IDirectDraw2;
extern HWND g_hDlgExit;
diff --git a/xorg-server/hw/xwin/winsetsp.c b/xorg-server/hw/xwin/winsetsp.c
index f894d6cda..674e147d4 100644
--- a/xorg-server/hw/xwin/winsetsp.c
+++ b/xorg-server/hw/xwin/winsetsp.c
@@ -34,6 +34,11 @@
#endif
#include "win.h"
+typedef struct mybitmap
+{
+ BITMAPINFOHEADER bmiHeader;
+ RGBQUAD bmiColors[256]; /* Maximum palette used in case of 8-bit per pixel */
+} mybitmap_t;
/* See Porting Layer Definition - p. 55 */
void
@@ -49,7 +54,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
PixmapPtr pPixmap = NULL;
winPrivPixmapPtr pPixmapPriv = NULL;
HBITMAP hbmpOrig = NULL;
- BITMAPINFO bmi;
+ mybitmap_t bmi;
HRGN hrgn = NULL, combined = NULL;
int nbox;
BoxPtr pbox;
@@ -90,7 +95,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
while (iSpans--)
{
- ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;
@@ -112,7 +117,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
0, 0,
*piWidths, 1,
pSrcs,
- (BITMAPINFO *) &bmi,
+ (BITMAPINFO*)&bmi,
DIB_RGB_COLORS,
g_copyROP[pGC->alu]);
@@ -136,7 +141,7 @@ winSetSpansNativeGDI (DrawablePtr pDrawable,
while (iSpans--)
{
- ZeroMemory (&bmi, sizeof (BITMAPINFO));
+ ZeroMemory (&bmi, sizeof (mybitmap_t));
bmi.bmiHeader.biSize = sizeof (BITMAPINFOHEADER);
bmi.bmiHeader.biWidth = *piWidths;
bmi.bmiHeader.biHeight = 1;
diff --git a/xorg-server/hw/xwin/winshaddd.c b/xorg-server/hw/xwin/winshaddd.c
index 0ef4bd432..a7ee92802 100644
--- a/xorg-server/hw/xwin/winshaddd.c
+++ b/xorg-server/hw/xwin/winshaddd.c
@@ -44,25 +44,6 @@
extern HWND g_hDlgExit;
extern const char *g_pszLogFile;
-/*
- * FIXME: Headers are broken, DEFINE_GUID doesn't work correctly,
- * so we have to redefine it here.
- */
-#ifndef _MSC_VER
-#ifdef DEFINE_GUID
-#undef DEFINE_GUID
-#define DEFINE_GUID(n,l,w1,w2,b1,b2,b3,b4,b5,b6,b7,b8) const GUID n GUID_SECT = {l,w1,w2,{b1,b2,b3,b4,b5,b6,b7,b8}}
-#endif /* DEFINE_GUID */
-#endif
-
-
-/*
- * FIXME: Headers are broken, IID_IDirectDraw4 has to be defined
- * here manually. Should be handled by ddraw.h
- */
-#ifndef IID_IDirectDraw2
-DEFINE_GUID( IID_IDirectDraw2,0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
-#endif /* IID_IDirectDraw2 */
/*
diff --git a/xorg-server/hw/xwin/winwndproc.c b/xorg-server/hw/xwin/winwndproc.c
index 73ca16bc5..ca3a66b49 100644
--- a/xorg-server/hw/xwin/winwndproc.c
+++ b/xorg-server/hw/xwin/winwndproc.c
@@ -641,7 +641,6 @@ winWindowProc (HWND hwnd, UINT message,
return TRUE;
case WM_PAINT:
- winDebug ("winWindowProc - WM_PAINT\n");
/* Only paint if we have privates and the server is enabled */
if (s_pScreenPriv == NULL
|| !s_pScreenPriv->fEnabled