Fixed two additional instances where video would start playing when it shouldn't.

This commit is contained in:
Leon Styhre 2020-09-27 13:14:50 +02:00
parent 54ea153d93
commit 4e9c1361be
3 changed files with 11 additions and 4 deletions

View file

@ -911,7 +911,7 @@ A statistics counter that counts how many times you're played the game. You norm
### Buttons
For game files, there will be four buttons displayed on the bottom of the metadata editor window, and for folders there will be three buttons. These are their functions:
For game files, there will be five buttons displayed on the bottom of the metadata editor window, and for folders there will be four. These are their functions:
**Scrape**

View file

@ -248,8 +248,11 @@ GuiMetaDataEd::GuiMetaDataEd(
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SCRAPE", "scrape",
std::bind(&GuiMetaDataEd::fetch, this)));
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SAVE", "save metadata",
[&] { save(); delete this; }));
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "SAVE", "save metadata", [&] {
save();
ViewController::get()->onPauseVideo();
delete this;
}));
buttons.push_back(std::make_shared<ButtonComponent>(mWindow, "CANCEL", "cancel changes",
[&] { delete this; }));

View file

@ -604,8 +604,12 @@ bool Window::cancelScreenSaver()
mScreenSaver->resetCounts();
// Tell the GUI components the screensaver has stopped.
for (auto it = mGuiStack.cbegin(); it != mGuiStack.cend(); it++)
for (auto it = mGuiStack.cbegin(); it != mGuiStack.cend(); it++) {
(*it)->onScreenSaverDeactivate();
// If the menu is open, pause the video so it won't start playing beneath the menu.
if (mGuiStack.front() != mGuiStack.back())
(*it)->onPauseVideo();
}
mSaturationAmount = 1.0;
mDimValue = 1.0;