summaryrefslogtreecommitdiffstats
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index 0ba7c07cc..56d892a31 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -854,8 +854,7 @@ void GMainWindow::InitializeHotkeys() {
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Mouse Panning"), this),
&QShortcut::activated, this, [&] {
Settings::values.mouse_panning = !Settings::values.mouse_panning;
- if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
- mouse_hide_timer.start();
+ if (Settings::values.mouse_panning) {
render_window->installEventFilter(render_window);
render_window->setAttribute(Qt::WA_Hover, true);
}
@@ -1208,11 +1207,14 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index) {
renderer_status_button->setDisabled(true);
if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
- mouse_hide_timer.start();
render_window->installEventFilter(render_window);
render_window->setAttribute(Qt::WA_Hover, true);
}
+ if (UISettings::values.hide_mouse) {
+ mouse_hide_timer.start();
+ }
+
std::string title_name;
std::string title_version;
const auto res = system.GetGameName(title_name);
@@ -2372,12 +2374,15 @@ void GMainWindow::OnConfigure() {
if ((UISettings::values.hide_mouse || Settings::values.mouse_panning) && emulation_running) {
render_window->installEventFilter(render_window);
render_window->setAttribute(Qt::WA_Hover, true);
- mouse_hide_timer.start();
} else {
render_window->removeEventFilter(render_window);
render_window->setAttribute(Qt::WA_Hover, false);
}
+ if (UISettings::values.hide_mouse) {
+ mouse_hide_timer.start();
+ }
+
UpdateStatusButtons();
}
@@ -2615,8 +2620,7 @@ void GMainWindow::UpdateUISettings() {
}
void GMainWindow::HideMouseCursor() {
- if (emu_thread == nullptr ||
- (!UISettings::values.hide_mouse && !Settings::values.mouse_panning)) {
+ if (emu_thread == nullptr && UISettings::values.hide_mouse) {
mouse_hide_timer.stop();
ShowMouseCursor();
return;
@@ -2626,8 +2630,7 @@ void GMainWindow::HideMouseCursor() {
void GMainWindow::ShowMouseCursor() {
render_window->unsetCursor();
- if (emu_thread != nullptr &&
- (UISettings::values.hide_mouse || Settings::values.mouse_panning)) {
+ if (emu_thread != nullptr && UISettings::values.hide_mouse) {
mouse_hide_timer.start();
}
}