From e7664b7a4fe1035bc3c9afb51254bfff1f25654a Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Sat, 11 Apr 2020 04:22:50 +0200 Subject: yuzu: Option to hide mouse on inactivity Co-Authored-By: Vitor K --- src/yuzu/bootmanager.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/yuzu/bootmanager.cpp') diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 1cac2f942..3d759f77b 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -292,6 +292,8 @@ GRenderWindow::GRenderWindow(GMainWindow* parent_, EmuThread* emu_thread_) setLayout(layout); InputCommon::Init(); + this->setMouseTracking(true); + connect(this, &GRenderWindow::FirstFrameDisplayed, parent_, &GMainWindow::OnLoadComplete); } @@ -385,6 +387,7 @@ void GRenderWindow::mousePressEvent(QMouseEvent* event) { } else if (event->button() == Qt::RightButton) { InputCommon::GetMotionEmu()->BeginTilt(pos.x(), pos.y()); } + QWidget::mousePressEvent(event); } void GRenderWindow::mouseMoveEvent(QMouseEvent* event) { @@ -397,6 +400,7 @@ void GRenderWindow::mouseMoveEvent(QMouseEvent* event) { const auto [x, y] = ScaleTouch(pos); this->TouchMoved(x, y); InputCommon::GetMotionEmu()->Tilt(pos.x(), pos.y()); + QWidget::mouseMoveEvent(event); } void GRenderWindow::mouseReleaseEvent(QMouseEvent* event) { -- cgit v1.2.3