1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-11-09 03:16:43 +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(); onClose();
} }
bool WindowBase::isVisible() bool WindowBase::isVisible() const
{ {
return mMainWidget->getVisible(); return mMainWidget->getVisible();
} }

View file

@ -37,7 +37,7 @@ namespace MWGui
/// Sets the visibility of the window /// Sets the visibility of the window
void setVisible(bool visible) override; void setVisible(bool visible) override;
/// Returns the visibility state of the window /// Returns the visibility state of the window
bool isVisible(); bool isVisible() const;
void center(); 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 // 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 // Also do not trigger bindings when input controls are disabled, e.g. during save loading
if (!MWBase::Environment::get().getWindowManager()->getSettingsWindow()->isVisible() const MWGui::SettingsWindow* settingsWindow
&& !input->controlsDisabled()) = MWBase::Environment::get().getWindowManager()->getSettingsWindow();
if ((!settingsWindow || !settingsWindow->isVisible()) && !input->controlsDisabled())
mBindingsManager->mousePressed(arg, id); mBindingsManager->mousePressed(arg, id);
} }