aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/winshadddnl.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
committermarha <marha@users.sourceforge.net>2009-07-12 18:20:04 +0000
commitda8fe31a7ba4acf109097d5696ad0145b991cdfd (patch)
tree1c74d6f075702a73e557872f2a6f020ea4eb5432 /xorg-server/hw/xwin/winshadddnl.c
parent6590f805a12779909cb8504c230fa367148fe38c (diff)
parent529dcfd0858d75cb3c87c73cb0f81dd20bbb9230 (diff)
downloadvcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.gz
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.tar.bz2
vcxsrv-da8fe31a7ba4acf109097d5696ad0145b991cdfd.zip
Changes for VC compilation
Diffstat (limited to 'xorg-server/hw/xwin/winshadddnl.c')
-rw-r--r--xorg-server/hw/xwin/winshadddnl.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/xorg-server/hw/xwin/winshadddnl.c b/xorg-server/hw/xwin/winshadddnl.c
index 47cc382e9..e029154ed 100644
--- a/xorg-server/hw/xwin/winshadddnl.c
+++ b/xorg-server/hw/xwin/winshadddnl.c
@@ -48,10 +48,12 @@ extern HWND g_hDlgExit;
* 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
@@ -391,7 +393,7 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
{
winDebug ("winAllocateFBShadowDDNL - Changing video mode\n");
- /* Change the video mode to the mode requested */
+ /* Change the video mode to the mode requested, and use the driver default refresh rate on failure */
ddrval = IDirectDraw4_SetDisplayMode (pScreenPriv->pdd4,
pScreenInfo->dwWidth,
pScreenInfo->dwHeight,
@@ -403,7 +405,20 @@ winAllocateFBShadowDDNL (ScreenPtr pScreen)
ErrorF ("winAllocateFBShadowDDNL - Could not set "
"full screen display mode: %08x\n",
(unsigned int) ddrval);
- return FALSE;
+ ErrorF ("winAllocateFBShadowDDNL - Using default driver refresh rate\n");
+ ddrval = IDirectDraw4_SetDisplayMode (pScreenPriv->pdd4,
+ pScreenInfo->dwWidth,
+ pScreenInfo->dwHeight,
+ pScreenInfo->dwBPP,
+ 0,
+ 0);
+ if (FAILED(ddrval))
+ {
+ ErrorF ("winAllocateFBShadowDDNL - Could not set default refresh rate "
+ "full screen display mode: %08x\n",
+ (unsigned int) ddrval);
+ return FALSE;
+ }
}
}
else
@@ -584,7 +599,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen,
{
winScreenPriv(pScreen);
winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo;
- RegionPtr damage = &pBuf->damage;
+ RegionPtr damage = shadowDamage(pBuf);
HRESULT ddrval = DD_OK;
RECT rcDest, rcSrc;
POINT ptOrigin;
@@ -1310,7 +1325,7 @@ winStoreColorsShadowDDNL (ColormapPtr pColormap,
+ pdefs[0].pixel);
if (FAILED (ddrval))
{
- ErrorF ("winStoreColorsShadowDDNL - SetEntries () failed: %08x\n", ddrval);
+ ErrorF ("winStoreColorsShadowDDNL - SetEntries () failed: %08x\n", (int) ddrval);
return FALSE;
}