aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-02-23 20:39:02 -0600
committergerman <german@thesoftwareartisans.com>2021-02-27 17:53:10 -0600
commit4738e14cb052a44c53e47379e595f00cef034dca (patch)
tree4264dd4e9d4a750951d1581241c484513c89b571 /src/yuzu/main.cpp
parentbfa16444640049b2c265fb3f2491252a1d1fe5fd (diff)
inputCommon: Mouse fixes
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();
}
}