|
|
@ -854,8 +854,7 @@ void GMainWindow::InitializeHotkeys() {
|
|
|
|
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Mouse Panning"), this),
|
|
|
|
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Mouse Panning"), this),
|
|
|
|
&QShortcut::activated, this, [&] {
|
|
|
|
&QShortcut::activated, this, [&] {
|
|
|
|
Settings::values.mouse_panning = !Settings::values.mouse_panning;
|
|
|
|
Settings::values.mouse_panning = !Settings::values.mouse_panning;
|
|
|
|
if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
|
|
|
|
if (Settings::values.mouse_panning) {
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, true);
|
|
|
|
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);
|
|
|
|
renderer_status_button->setDisabled(true);
|
|
|
|
|
|
|
|
|
|
|
|
if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
|
|
|
|
if (UISettings::values.hide_mouse || Settings::values.mouse_panning) {
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, true);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (UISettings::values.hide_mouse) {
|
|
|
|
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
std::string title_name;
|
|
|
|
std::string title_name;
|
|
|
|
std::string title_version;
|
|
|
|
std::string title_version;
|
|
|
|
const auto res = system.GetGameName(title_name);
|
|
|
|
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) {
|
|
|
|
if ((UISettings::values.hide_mouse || Settings::values.mouse_panning) && emulation_running) {
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->installEventFilter(render_window);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, true);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, true);
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
render_window->removeEventFilter(render_window);
|
|
|
|
render_window->removeEventFilter(render_window);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, false);
|
|
|
|
render_window->setAttribute(Qt::WA_Hover, false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (UISettings::values.hide_mouse) {
|
|
|
|
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
UpdateStatusButtons();
|
|
|
|
UpdateStatusButtons();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -2615,8 +2620,7 @@ void GMainWindow::UpdateUISettings() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::HideMouseCursor() {
|
|
|
|
void GMainWindow::HideMouseCursor() {
|
|
|
|
if (emu_thread == nullptr ||
|
|
|
|
if (emu_thread == nullptr && UISettings::values.hide_mouse) {
|
|
|
|
(!UISettings::values.hide_mouse && !Settings::values.mouse_panning)) {
|
|
|
|
|
|
|
|
mouse_hide_timer.stop();
|
|
|
|
mouse_hide_timer.stop();
|
|
|
|
ShowMouseCursor();
|
|
|
|
ShowMouseCursor();
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -2626,8 +2630,7 @@ void GMainWindow::HideMouseCursor() {
|
|
|
|
|
|
|
|
|
|
|
|
void GMainWindow::ShowMouseCursor() {
|
|
|
|
void GMainWindow::ShowMouseCursor() {
|
|
|
|
render_window->unsetCursor();
|
|
|
|
render_window->unsetCursor();
|
|
|
|
if (emu_thread != nullptr &&
|
|
|
|
if (emu_thread != nullptr && UISettings::values.hide_mouse) {
|
|
|
|
(UISettings::values.hide_mouse || Settings::values.mouse_panning)) {
|
|
|
|
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
mouse_hide_timer.start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|