summaryrefslogtreecommitdiff
path: root/src/yuzu/bootmanager.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2023-11-24 18:55:49 -0600
committerNarr the Reg <juangerman-13@hotmail.com>2023-11-24 19:32:35 -0600
commitf61cf1464688e5b4b2201414744445002ddc2e4a (patch)
tree4380604aa59c841d4630fb04c053bf1702fce355 /src/yuzu/bootmanager.h
parent91c12db07098625756338e682a4d300a27d7978c (diff)
yuzu: Constrain mouse in render window when emulated
Diffstat (limited to 'src/yuzu/bootmanager.h')
-rw-r--r--src/yuzu/bootmanager.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h
index 87b23df12..60edd464c 100644
--- a/src/yuzu/bootmanager.h
+++ b/src/yuzu/bootmanager.h
@@ -17,6 +17,7 @@
#include <QString>
#include <QStringList>
#include <QThread>
+#include <QTimer>
#include <QWidget>
#include <qglobal.h>
#include <qnamespace.h>
@@ -38,7 +39,6 @@ class QMouseEvent;
class QObject;
class QResizeEvent;
class QShowEvent;
-class QTimer;
class QTouchEvent;
class QWheelEvent;
@@ -166,6 +166,7 @@ public:
std::pair<u32, u32> ScaleTouch(const QPointF& pos) const;
void closeEvent(QCloseEvent* event) override;
+ void leaveEvent(QEvent* event) override;
void resizeEvent(QResizeEvent* event) override;
@@ -229,6 +230,7 @@ private:
void TouchBeginEvent(const QTouchEvent* event);
void TouchUpdateEvent(const QTouchEvent* event);
void TouchEndEvent();
+ void ConstrainMouse();
void RequestCameraCapture();
void OnCameraCapture(int requestId, const QImage& img);
@@ -268,6 +270,8 @@ private:
std::unique_ptr<QTimer> camera_timer;
#endif
+ QTimer mouse_constrain_timer;
+
Core::System& system;
protected: