From aff7d93a2111b4707f871e4ec58e314828d21aa6 Mon Sep 17 00:00:00 2001 From: Mads Buvik Sandvei Date: Sun, 29 Nov 2020 19:02:06 +0100 Subject: [PATCH] This is why i wanted MyGUI 3.4. So many hacks to use 3.2. --- apps/openmw/mwvr/openxrmanagerimpl.cpp | 1 + apps/openmw/mwvr/vrgui.cpp | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/openmw/mwvr/openxrmanagerimpl.cpp b/apps/openmw/mwvr/openxrmanagerimpl.cpp index 6c4c8f83a..07d15ad46 100644 --- a/apps/openmw/mwvr/openxrmanagerimpl.cpp +++ b/apps/openmw/mwvr/openxrmanagerimpl.cpp @@ -345,6 +345,7 @@ namespace MWVR void* userData) { OpenXRManagerImpl* manager = reinterpret_cast(userData); + (void)manager; std::string severityStr = ""; std::string typeStr = ""; diff --git a/apps/openmw/mwvr/vrgui.cpp b/apps/openmw/mwvr/vrgui.cpp index 23dcc8bed..e9e9e91e9 100644 --- a/apps/openmw/mwvr/vrgui.cpp +++ b/apps/openmw/mwvr/vrgui.cpp @@ -915,7 +915,10 @@ namespace MWVR else { mFocusWidget->_riseMouseButtonReleased(mGuiCursor.x(), mGuiCursor.y(), MyGUI::MouseButton::Left); - mFocusWidget->_riseMouseButtonClick(); + + // Some widgets are invalidated before returning from _riseMouseButtonReleased + if (validateFocusWidget()) + mFocusWidget->_riseMouseButtonClick(); } return true; }