Esempio n. 1
0
BOOL Game::flip()
{
	BOOL returnValue;
    HRESULT flipResult = thePrimarySurface->Flip(NULL,DDFLIP_WAIT);
    if (flipResult == DDERR_SURFACELOST)
    {
        Logger::log("Attempting to restore surfaces");
        returnValue = restoreSurfaces(itsLastTickTime);
    }
    else if (SUCCEEDED(flipResult))
    {
        returnValue = TRUE;
    }
    else
    {
        Logger::error("Flip failed, but it wasn't due to restore issues");
        returnValue = FALSE;
    }
	return returnValue;
}
Esempio n. 2
0
bool DXGame::pageFlip(){ 
  if(lpPrimary->Flip(NULL, DDFLIP_WAIT) == DDERR_SURFACELOST)
    return restoreSurfaces();
  return TRUE;
}