DirectDraw: fix access violation on systems with default vga driver (Brian Friesen)

This commit is contained in:
OV2 2010-10-04 17:30:03 +02:00
parent 856724cffe
commit ccd8c5edfd
1 changed files with 4 additions and 0 deletions

View File

@ -551,6 +551,8 @@ void CDirectDraw::Render(SSurface Src)
unsigned int newFilterScale;
if(!dDinitialized) return;
ZeroMemory(&caps,sizeof(DDSCAPS));
caps.dwCaps = DDSCAPS_BACKBUFFER;
@ -876,6 +878,8 @@ HRESULT CALLBACK EnumModesCallback( LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpCo
void CDirectDraw::EnumModes(std::vector<dMode> *modeVector)
{
if(!dDinitialized)
return;
lpDD->EnumDisplayModes(DDEDM_REFRESHRATES,NULL,(void *)modeVector,(LPDDENUMMODESCALLBACK)EnumModesCallback);
}