aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/yuzu/main.h
diff options
context:
space:
mode:
authorPurple <[email protected]>2022-04-20 02:22:51 +0600
committerGitHub <[email protected]>2022-04-19 16:22:51 -0400
commit9dfadc8b3074109dab8e47a24bc60e9ea956c579 (patch)
tree4f945e3f25af97b177a998d23d1a4cabdc11297b /src/yuzu/main.h
parent9a47330fec3a3caad0d054b44fd4285f76262b59 (diff)
downloadyuzu-mainline-9dfadc8b3074109dab8e47a24bc60e9ea956c579.tar.gz
yuzu-mainline-9dfadc8b3074109dab8e47a24bc60e9ea956c579.zip
Prevent the mouse cursor from leaving the window when mouse panning is enabled
Diffstat (limited to 'src/yuzu/main.h')
-rw-r--r--src/yuzu/main.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/yuzu/main.h b/src/yuzu/main.h
index ab95a7518..b399e9b01 100644
--- a/src/yuzu/main.h
+++ b/src/yuzu/main.h
@@ -328,6 +328,7 @@ private:
void UpdateUISettings();
void HideMouseCursor();
void ShowMouseCursor();
+ void CenterMouseCursor();
void OpenURL(const QUrl& url);
void LoadTranslation();
void OpenPerGameConfiguration(u64 title_id, const std::string& file_name);
@@ -372,6 +373,7 @@ private:
bool auto_paused = false;
bool auto_muted = false;
QTimer mouse_hide_timer;
+ QTimer mouse_center_timer;
// FS
std::shared_ptr<FileSys::VfsFilesystem> vfs;
@@ -418,4 +420,5 @@ protected:
void dropEvent(QDropEvent* event) override;
void dragEnterEvent(QDragEnterEvent* event) override;
void dragMoveEvent(QDragMoveEvent* event) override;
+ void leaveEvent(QEvent* event) override;
};