Processing with Busy Present Queues
A DirectX 9.0 version driver must return the DDERR_WASSTILLDRAWING value from a call to its DdFlip function if the runtime passed the DDFLIP_DONOTWAIT flag in the dwFlags member of the DD_FLIPDATA structure and the driver is unable to schedule a presentation, for example, if the present queue is full or if the driver is waiting for a vsync interval. The runtime calls the driver's DdFlip function with DDFLIP_DONOTWAIT set if an application called the IDirect3DSwapChain9::Present method with the D3DPRESENT_DONOTWAIT flag set. If the driver cannot schedule a presentation, its DdFlip function returns DDERR_WASSTILLDRAWING in the ddRVal member of DD_FLIPDATA. The application's Present method in turn returns DDERR_WASSTILLDRAWING, which lets the application perform other processing.
The D3DPRESENT_DONOTWAIT flag is new for DirectX 9.0. The DDFLIP_DONOTWAIT flag has been available since DirectX 7.0. If a DirectX 7.0 application were to set DDFLIP_DONOTWAIT in a call to the IDirectDrawSurface7::Flip method, a DirectX 7.0 or later driver's DdFlip function would receive the DDFLIP_DONOTWAIT flag.
If D3DPRESENT_DONOTWAIT is not set, Present behaves as in DirectX 8.1 and earlier. That is, Present spins until the hardware is free, without returning an error.
For more information about IDirect3DSwapChainXxx::Present, see the latest DirectX SDK documentation.