Small hack for Getting monitor freq right.

svn path=/trunk/; revision=19016
This commit is contained in:
Magnus Olsen 2005-11-05 15:32:23 +00:00
parent 0102313dcb
commit 7b9a187c56
2 changed files with 7 additions and 3 deletions

View file

@ -77,7 +77,7 @@ HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pD
This->More.dmiDDrawReserved7.wWidth = This->Global.wWidth; This->More.dmiDDrawReserved7.wWidth = This->Global.wWidth;
This->More.dmiDDrawReserved7.wHeight = This->Global.wHeight; This->More.dmiDDrawReserved7.wHeight = This->Global.wHeight;
This->More.dmiDDrawReserved7.wBPP = This->owner->Bpp; This->More.dmiDDrawReserved7.wBPP = This->owner->Bpp;
//This->More.dmiDDrawReserved7.wRefreshRate = ; This->More.dmiDDrawReserved7.wRefreshRate = This->owner->DirectDrawGlobal.dwMonitorFrequency;
//This->More.dmiDDrawReserved7.wMonitorsAttachedToDesktop = 2; //This->More.dmiDDrawReserved7.wMonitorsAttachedToDesktop = 2;
/* ToDo: fill ddsCapsEx */ /* ToDo: fill ddsCapsEx */
@ -86,7 +86,7 @@ HRESULT Hal_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pD
This->Local.lpGbl = &This->Global; This->Local.lpGbl = &This->Global;
This->Local.lpSurfMore = &This->More; This->Local.lpSurfMore = &This->More;
This->Local.ddsCaps.dwCaps = pDDSD2->ddsCaps.dwCaps; This->Local.ddsCaps.dwCaps = pDDSD2->ddsCaps.dwCaps;
This->Local.dwProcessId = GetCurrentProcessId(); This->Local.dwProcessId = This->owner->ExclusiveOwner.dwProcessId;
/* for the double pointer below */ /* for the double pointer below */
This->pLocal[0] = &This->Local; This->pLocal[0] = &This->Local;

View file

@ -47,6 +47,10 @@ HRESULT WINAPI Main_DirectDraw_Initialize (LPDIRECTDRAW7 iface, LPGUID lpGUID)
if((ret = Hel_DirectDraw_Initialize (iface)) != DD_OK) if((ret = Hel_DirectDraw_Initialize (iface)) != DD_OK)
return ret; return ret;
/* Hack to set right freq */
This->DirectDrawGlobal.dwMonitorFrequency = GetDeviceCaps((HDC)This->DirectDrawGlobal.lpExclusiveOwner->hDC , VREFRESH);
return DD_OK; return DD_OK;
} }