fixing a smaller bug extream hard to find,

if we got two or more directdraw object we choice always the lates hDD not the object own hDD
use This->lpLcl->lpGbl->hDD = This->lpLcl->hDD; to set the object own hDD before call any dxhal api

svn path=/trunk/; revision=27070
This commit is contained in:
Magnus Olsen 2007-06-08 12:57:00 +00:00
parent 869f31838e
commit e248b95f9d
2 changed files with 5 additions and 0 deletions

View file

@ -177,6 +177,7 @@ Main_DirectDraw_SetDisplayMode (LPDIRECTDRAW7 iface, DWORD dwWidth, DWORD dwHeig
{
// Update Interals
BOOL ModeChanged;
This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
DdReenableDirectDrawObject(This->lpLcl->lpGbl, &ModeChanged);
StartDirectDraw((LPDIRECTDRAW)iface, 0, TRUE);
}
@ -203,6 +204,8 @@ Main_DirectDraw_RestoreDisplayMode (LPDIRECTDRAW7 iface)
// Update Interals
BOOL ModeChanged;
This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
DdReenableDirectDrawObject(This->lpLcl->lpGbl, &ModeChanged);
StartDirectDraw((LPDIRECTDRAW)iface, 0, TRUE);
}

View file

@ -202,6 +202,8 @@ Main_DirectDraw_GetAvailableVidMem(LPDIRECTDRAW7 iface, LPDDSCAPS2 ddscaps,
memdata.ddRVal = DDERR_INVALIDPARAMS;
memcpy(&memdata.DDSCaps, ddscaps, sizeof(DDSCAPS2));
This->lpLcl->lpGbl->hDD = This->lpLcl->hDD;
if (This->lpLcl->lpDDCB->HALDDMiscellaneous.GetAvailDriverMemory(&memdata) == DDHAL_DRIVER_NOTHANDLED)
{
retVal = DDERR_NODIRECTDRAWHW;