Add "Enable Mouse-based Gyro" setting to I/O config (#18835)

This is a continuation of my work on #18113.

Addresses issue #18197.

Adds a new checkbox in the I/O settings tab that enables mouse-based
gyro emulation at game startup, making the feature more discoverable to
users.
This commit is contained in:
Windsurf7
2026-06-04 14:49:48 +02:00
committed by GitHub
parent 97704e35e0
commit 9a2243bfcb
9 changed files with 22 additions and 1 deletions
+6
View File
@@ -26,6 +26,12 @@ bool mouse_gyro_handler::toggle_enabled()
return m_enabled;
}
void mouse_gyro_handler::set_enabled(bool enabled)
{
m_enabled = enabled;
clear();
}
void mouse_gyro_handler::set_gyro_active()
{
gui_log.notice("Mouse-based gyro activated");
+1
View File
@@ -13,6 +13,7 @@ class mouse_gyro_handler
public:
void clear();
bool toggle_enabled();
void set_enabled(bool enabled);
void handle_event(QEvent* ev, const QWindow& win);
void apply_gyro(const std::shared_ptr<Pad>& pad);
+1 -1
View File
@@ -82,7 +82,7 @@ void pad_thread::Init()
std::lock_guard lock(pad::g_pad_mutex);
// Reset mouse-based gyro state
m_mouse_gyro.clear();
m_mouse_gyro.set_enabled(g_cfg.io.mouse_based_gyro_enabled.get());
// Cache old settings if possible
std::array<pad_setting, CELL_PAD_MAX_PORT_NUM> pad_settings;