Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.5 KiB

  1. /*==========================================================================;
  2. *
  3. * Copyright (C) 1995 Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: halscene.c
  6. * Content: Direct3D HAL scene capture
  7. *@@BEGIN_MSINTERNAL
  8. *
  9. * History:
  10. * Date By Reason
  11. * ==== == ======
  12. * 07/12/95 stevela Initial rev.
  13. *@@END_MSINTERNAL
  14. *
  15. ***************************************************************************/
  16. #include "pch.cpp"
  17. #pragma hdrstop
  18. HRESULT D3DHAL_SceneCapture(LPDIRECT3DDEVICEI lpDevI,
  19. BOOL bState)
  20. {
  21. D3DHAL_SCENECAPTUREDATA data;
  22. HRESULT ret;
  23. if (IS_DX7HAL_DEVICE(lpDevI))
  24. {
  25. return lpDevI->SetRenderStateI((D3DRENDERSTATETYPE)D3DRENDERSTATE_SCENECAPTURE, bState);
  26. }
  27. ret = CallRampService(lpDevI, RAMP_SERVICE_SCENE_CAPTURE, bState, lpDevI);
  28. if (ret != DD_OK)
  29. {
  30. return ret;
  31. }
  32. if (!lpDevI->lpD3DHALCallbacks->SceneCapture) {
  33. return (D3D_OK);
  34. }
  35. D3D_INFO(6, "SceneCapture, setting %d dwhContext = %d",
  36. bState, lpDevI->dwhContext);
  37. memset(&data, 0, sizeof(D3DHAL_SCENECAPTUREDATA));
  38. data.dwhContext = lpDevI->dwhContext;
  39. data.dwFlag = bState ? D3DHAL_SCENE_CAPTURE_START : D3DHAL_SCENE_CAPTURE_END;
  40. CALL_HALONLY(ret, lpDevI, SceneCapture, &data);
  41. if (ret != DDHAL_DRIVER_HANDLED || data.ddrval != DD_OK) {
  42. D3D_ERR("HAL failed to handle SceneCapture");
  43. return (data.ddrval);
  44. }
  45. return (D3D_OK);
  46. }