diff options
author | FearlessTobi <thm.frey@gmail.com> | 2020-04-11 04:22:50 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2020-04-20 04:21:58 +0200 |
commit | e7664b7a4fe1035bc3c9afb51254bfff1f25654a (patch) | |
tree | 1ef014c1cebc971271f26cc7669c0010ffe1a463 /src/yuzu/bootmanager.cpp | |
parent | 4932010c6f5fc5f2d0c78e69285eaccd64a32c0f (diff) |
yuzu: Option to hide mouse on inactivity
Co-Authored-By: Vitor K <vitor-k@users.noreply.github.com>
Diffstat (limited to 'src/yuzu/bootmanager.cpp')
-rw-r--r-- | src/yuzu/bootmanager.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 1cac2f942f..3d759f77b2 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) { |