mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-07 12:54:00 +00:00
Fix not reacting to quit request while video is playing
This commit is contained in:
parent
c0f1449004
commit
cefa20bfb9
@ -42,4 +42,9 @@ bool VideoWidget::update()
|
||||
return mPlayer.isPlaying();
|
||||
}
|
||||
|
||||
void VideoWidget::cleanup()
|
||||
{
|
||||
mPlayer.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -26,6 +26,9 @@ namespace MWGui
|
||||
/// @return Is the video still playing?
|
||||
bool update();
|
||||
|
||||
/// Free video player resources (done automatically on destruction)
|
||||
void cleanup();
|
||||
|
||||
private:
|
||||
bool mAllowSkipping;
|
||||
|
||||
|
@ -1576,12 +1576,13 @@ namespace MWGui
|
||||
bool cursorWasVisible = mCursorVisible;
|
||||
setCursorVisible(false);
|
||||
|
||||
while (mVideoWidget->update())
|
||||
while (mVideoWidget->update() && !MWBase::Environment::get().getStateManager()->hasQuitRequest())
|
||||
{
|
||||
MWBase::Environment::get().getInputManager()->update(0, true, false);
|
||||
|
||||
mRendering->getWindow()->update();
|
||||
}
|
||||
mVideoWidget->cleanup();
|
||||
|
||||
setCursorVisible(cursorWasVisible);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user