1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 19:15:41 +00:00

Don't crash when clicking the logo video

This commit is contained in:
Evil Eye 2024-01-06 14:23:08 +01:00
parent 21f177daac
commit 72c382aca6
3 changed files with 5 additions and 4 deletions

View file

@ -58,7 +58,7 @@ void WindowBase::setVisible(bool visible)
onClose();
}
bool WindowBase::isVisible()
bool WindowBase::isVisible() const
{
return mMainWidget->getVisible();
}

View file

@ -37,7 +37,7 @@ namespace MWGui
/// Sets the visibility of the window
void setVisible(bool visible) override;
/// Returns the visibility state of the window
bool isVisible();
bool isVisible() const;
void center();

View file

@ -158,8 +158,9 @@ namespace MWInput
// Don't trigger any mouse bindings while in settings menu, otherwise rebinding controls becomes impossible
// Also do not trigger bindings when input controls are disabled, e.g. during save loading
if (!MWBase::Environment::get().getWindowManager()->getSettingsWindow()->isVisible()
&& !input->controlsDisabled())
const MWGui::SettingsWindow* settingsWindow
= MWBase::Environment::get().getWindowManager()->getSettingsWindow();
if ((!settingsWindow || !settingsWindow->isVisible()) && !input->controlsDisabled())
mBindingsManager->mousePressed(arg, id);
}