mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-25 07:21:14 +01:00
Bug: fix unhide on mouse movement only responding to clicks
Previously the unhide of movement mouse_timer reset occurred within case MouseButtonPress. Additionally, there was a redundant expression in the if statement for cursor locking.
This commit is contained in:
parent
f19da1cf92
commit
5145853351
@ -362,16 +362,18 @@ bool RenderWidget::event(QEvent* event)
|
||||
{
|
||||
// Lock the cursor with any mouse button click (behave the same as window focus change).
|
||||
// This event is occasionally missed because isActiveWindow is laggy
|
||||
if (Settings::Instance().GetLockCursor() && event->type() == QEvent::MouseButtonPress)
|
||||
if (Settings::Instance().GetLockCursor())
|
||||
{
|
||||
SetCursorLocked(true);
|
||||
}
|
||||
// Unhide on movement
|
||||
if (!Settings::Instance().GetHideCursor())
|
||||
{
|
||||
setCursor(Qt::ArrowCursor);
|
||||
m_mouse_timer->start(MOUSE_HIDE_DELAY);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case QEvent::MouseMove:
|
||||
// Unhide on movement
|
||||
if (!Settings::Instance().GetHideCursor())
|
||||
{
|
||||
setCursor(Qt::ArrowCursor);
|
||||
m_mouse_timer->start(MOUSE_HIDE_DELAY);
|
||||
}
|
||||
break;
|
||||
case QEvent::WinIdChange:
|
||||
|
Loading…
x
Reference in New Issue
Block a user