From 37b200627ab74284cee1395f7fc394ef49508b15 Mon Sep 17 00:00:00 2001 From: Lionel Ulmer Date: Sat, 22 May 1999 19:22:26 +0000 Subject: [PATCH] - added some more debug output - corrected a slight bug in DGA DirectDraw creation --- graphics/ddraw.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/graphics/ddraw.c b/graphics/ddraw.c index 627f8649cf8..927b41cfa16 100644 --- a/graphics/ddraw.c +++ b/graphics/ddraw.c @@ -1347,6 +1347,8 @@ static HRESULT WINAPI IDirectDrawSurface4Impl_GetPixelFormat( *pf = This->s.surface_desc.ddpfPixelFormat; + _dump_pixelformat(pf); + return DD_OK; } @@ -4479,18 +4481,27 @@ HRESULT WINAPI DGA_DirectDrawCreate( LPDIRECTDRAW *lplpDD, LPUNKNOWN pUnkOuter) if (!(flags & XF86DGADirectPresent)) MSG("direct video is NOT PRESENT.\n"); TSXF86DGAGetVideo(display,DefaultScreen(display),&addr,&width,&banksize,&memsize); + (*ilplpDD)->e.dga.fb_width = width; + TSXF86DGAGetViewPortSize(display,DefaultScreen(display),&width,&height); + TSXF86DGASetViewPort(display,DefaultScreen(display),0,0); + (*ilplpDD)->e.dga.fb_height = height; TRACE(ddraw,"video framebuffer: begin %p, width %d,banksize %d,memsize %d\n", addr,width,banksize,memsize ); - (*ilplpDD)->e.dga.fb_width = width; - (*ilplpDD)->d.width = width; + TRACE(ddraw,"viewport height: %d\n",height); + + /* Get the screen dimensions as seen by Wine. + In that case, it may be better to ignore the -desktop mode and return the + real screen size => print a warning */ + (*ilplpDD)->d.height = MONITOR_GetHeight(&MONITOR_PrimaryMonitor); + (*ilplpDD)->d.width = MONITOR_GetWidth(&MONITOR_PrimaryMonitor); + if (((*ilplpDD)->d.height != height) || + ((*ilplpDD)->d.width != width)) + WARN(ddraw, "You seem to be runnin in -desktop mode. This may prove dangerous in DGA mode...\n"); (*ilplpDD)->e.dga.fb_addr = addr; (*ilplpDD)->e.dga.fb_memsize = memsize; (*ilplpDD)->e.dga.fb_banksize = banksize; - TSXF86DGAGetViewPortSize(display,DefaultScreen(display),&width,&height); - TSXF86DGASetViewPort(display,DefaultScreen(display),0,0); - (*ilplpDD)->e.dga.fb_height = MONITOR_GetHeight(&MONITOR_PrimaryMonitor); #ifdef DIABLO_HACK (*ilplpDD)->e.dga.vpmask = 1; #else