/* * iAction should be LIBDVDNAV_BUTTON_NORMAL or LIBDVDNAV_BUTTON_CLICKED */ void CDVDOverlayContainer::UpdateOverlayInfo(std::shared_ptr<CDVDInputStreamNavigator> pStream, CDVDDemuxSPU *pSpu, int iAction) { CSingleLock lock(*this); pStream->CheckButtons(); //Update any forced overlays. for(VecOverlays::iterator it = m_overlays.begin(); it != m_overlays.end(); ++it ) { if ((*it)->IsOverlayType(DVDOVERLAY_TYPE_SPU)) { CDVDOverlaySpu* pOverlaySpu = (CDVDOverlaySpu*)(*it); // make sure its a forced (menu) overlay // set menu spu color and alpha data if there is a valid menu overlay if (pOverlaySpu->bForced) { if (pOverlaySpu->Acquire()->Release() > 1) { pOverlaySpu = new CDVDOverlaySpu(*pOverlaySpu); (*it)->Release(); (*it) = pOverlaySpu; } if(pStream->GetCurrentButtonInfo(pOverlaySpu, pSpu, iAction)) { pOverlaySpu->m_textureid = 0; } } } } }