1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2026-01-07 13:00:59 +00:00

Fix controller tooltip disappearing because of spurious controller input

This commit is contained in:
Andrew Lanzone 2025-06-21 22:04:35 -07:00
parent c41f034a23
commit fb5fa6ce18
2 changed files with 2 additions and 2 deletions

View file

@ -81,7 +81,6 @@ namespace MWGui
if (Settings::gui().mControllerMenus)
{
MWBase::Environment::get().getWindowManager()->setControllerTooltip(false);
mControllerFocus = std::clamp(mControllerFocus, 0, mItemCount - 1);
updateControllerFocus(-1, mControllerFocus);
}
@ -215,6 +214,7 @@ namespace MWGui
// Select the focused item, if any.
if (mControllerFocus >= 0 && mControllerFocus < mItemCount)
{
MWBase::Environment::get().getWindowManager()->setControllerTooltip(false);
MyGUI::Widget* dragArea = mScrollView->getChildAt(0);
onSelectedItem(dragArea->getChildAt(mControllerFocus));
}

View file

@ -360,7 +360,7 @@ namespace MWInput
&& (arg.axis == SDL_CONTROLLER_AXIS_LEFTX || arg.axis == SDL_CONTROLLER_AXIS_LEFTY))
{
// Treat the left stick like a cursor, which is the default behavior.
if (winMgr->getControllerTooltip())
if (winMgr->getControllerTooltip() && std::abs(arg.value) > 2000)
{
winMgr->setControllerTooltip(false);
winMgr->setCursorVisible(true);