| 201 | } |
| 202 | |
| 203 | bool CUISequenceVideoItem::Stop(bool bForce) |
| 204 | { |
| 205 | if (!m_flags.test(etiCanBeStopped) && !bForce && IsPlaying()) |
| 206 | return false; |
| 207 | |
| 208 | m_flags.set(etiPlaying, FALSE); |
| 209 | |
| 210 | m_wnd->Show(false); |
| 211 | m_owner->MainWnd()->DetachChild(m_wnd); |
| 212 | |
| 213 | for (auto& snd : m_sounds) |
| 214 | snd.stop(); |
| 215 | |
| 216 | m_texture->ResetTexture(); |
| 217 | |
| 218 | if (m_flags.test(etiNeedPauseOn) && !m_flags.test(etiStoredPauseState)) |
| 219 | Device.Pause(FALSE, TRUE, TRUE, "videoitem_stop"); |
| 220 | |
| 221 | if (m_flags.test(etiNeedPauseOff) && m_flags.test(etiStoredPauseState)) |
| 222 | Device.Pause(TRUE, TRUE, TRUE, "videoitem_stop"); |
| 223 | |
| 224 | if (m_flags.test(etiNeedPauseSound)) |
| 225 | Device.Pause(FALSE, FALSE, TRUE, "videoitem_stop"); |
| 226 | |
| 227 | inherited::Stop(); |
| 228 | return true; |
| 229 | } |
nothing calls this directly
no test coverage detected