diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-30 00:45:25 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-30 00:45:25 +0100 |
commit | cafca891ea7c02a3e298675b070aef86773220b7 (patch) | |
tree | 8a7180b59abdea9ea1ade1b2fdc6b03ae8fcd012 /src/yuzu | |
parent | Merge pull request #9352 from lioncash/vidcast (diff) | |
parent | input_common: Pump sdl events from main thread (diff) | |
download | yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar.gz yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar.bz2 yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar.lz yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar.xz yuzu-cafca891ea7c02a3e298675b070aef86773220b7.tar.zst yuzu-cafca891ea7c02a3e298675b070aef86773220b7.zip |
Diffstat (limited to 'src/yuzu')
-rw-r--r-- | src/yuzu/main.cpp | 12 | ||||
-rw-r--r-- | src/yuzu/main.h | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 346d14252..c21153560 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -167,6 +167,7 @@ __declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; constexpr int default_mouse_hide_timeout = 2500; constexpr int default_mouse_center_timeout = 10; +constexpr int default_input_update_timeout = 1; /** * "Callouts" are one-time instructional messages shown to the user. In the config settings, there @@ -405,6 +406,10 @@ GMainWindow::GMainWindow(std::unique_ptr<Config> config_, bool has_broken_vulkan mouse_center_timer.setInterval(default_mouse_center_timeout); connect(&mouse_center_timer, &QTimer::timeout, this, &GMainWindow::CenterMouseCursor); + update_input_timer.setInterval(default_input_update_timeout); + connect(&update_input_timer, &QTimer::timeout, this, &GMainWindow::UpdateInputDrivers); + update_input_timer.start(); + MigrateConfigFiles(); if (has_broken_vulkan) { @@ -3637,6 +3642,13 @@ void GMainWindow::UpdateUISettings() { UISettings::values.first_start = false; } +void GMainWindow::UpdateInputDrivers() { + if (!input_subsystem) { + return; + } + input_subsystem->PumpEvents(); +} + void GMainWindow::HideMouseCursor() { if (emu_thread == nullptr && UISettings::values.hide_mouse) { mouse_hide_timer.stop(); diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 6a9992d05..4f9c3b450 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -353,6 +353,7 @@ private: void UpdateGPUAccuracyButton(); void UpdateStatusButtons(); void UpdateUISettings(); + void UpdateInputDrivers(); void HideMouseCursor(); void ShowMouseCursor(); void CenterMouseCursor(); @@ -404,6 +405,7 @@ private: bool auto_muted = false; QTimer mouse_hide_timer; QTimer mouse_center_timer; + QTimer update_input_timer; QString startup_icon_theme; bool os_dark_mode = false; |