Ticket #6618: 6618-vout_d3d_reinit.patch
| File 6618-vout_d3d_reinit.patch, 2.0 KB (added by , 17 years ago) |
|---|
-
libs/libmythtv/videoout_d3d.cpp
188 188 QMutexLocker locker(&m_lock); 189 189 D3DCAPS9 d3dCaps; 190 190 191 UnInitD3D(); 192 191 193 typedef LPDIRECT3D9 (WINAPI *LPFND3DC)(UINT SDKVersion); 192 194 static LPFND3DC OurDirect3DCreate9 = NULL; 193 195 static HINSTANCE hD3DLib = NULL; … … 258 260 d3dpp.hDeviceWindow = m_hWnd; 259 261 d3dpp.Windowed = TRUE; 260 262 d3dpp.BackBufferWidth = m_InputCX; 261 d3dpp.BackBufferHeight = m_InputC X;263 d3dpp.BackBufferHeight = m_InputCY; 262 264 d3dpp.BackBufferCount = 1; 263 265 d3dpp.MultiSampleType = D3DMULTISAMPLE_NONE; 264 266 d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; … … 522 524 return; 523 525 } 524 526 527 if (!m_pSurface) 528 { 529 VERBOSE(VB_IMPORTANT, LOC_ERR + "Picture surface not initialized"); 530 return; 531 } 532 525 533 if (!buffer) 526 534 buffer = vbuffers.GetScratchFrame(); 527 535 … … 581 589 switch (hr) 582 590 { 583 591 case D3DERR_DEVICENOTRESET: 584 VERBOSE(VB_IMPORTANT, LOC_ERR + 585 "The device has been lost but can be reset " 586 "at this time. TODO: implement device reset"); 587 // TODO: instead of goto renderError, reset the device 588 //m_pd3dDevice->Reset(... 592 VERBOSE(VB_IMPORTANT, LOC + 593 "The device was lost and will be reset now."); 594 InitD3D(); 589 595 goto RenderError; 590 596 case D3DERR_DEVICELOST: 591 VERBOSE(VB_ IMPORTANT, LOC_ERR+597 VERBOSE(VB_PLAYBACK, LOC + 592 598 "The device has been lost and cannot be reset " 593 599 "at this time."); 594 600 goto RenderError;
