// 画面フリップ if ( FAILED(lpD3DDEV->Present(NULL,NULL,NULL,NULL)) ) bDeviceLost = TRUE;
if( bDeviceLost ) { // Test the cooperative level to see if it's okay to render if( FAILED( hr = lpD3DDEV->TestCooperativeLevel() ) ) { // Check if the device needs to be reset. if( D3DERR_DEVICENOTRESET == hr ) { //デバイスの再作成を行います