From 0c2801b6d3c65412626867a1823f38b22625e8ef Mon Sep 17 00:00:00 2001 From: lizzie Date: Fri, 4 Sep 2026 23:59:41 +0000 Subject: [PATCH] 2026-09-04 23:59:41 Signed-off-by: lizzie --- src/yuzu_cmd/emu_window/emu_window_sdl3.cpp | 6 ++++++ src/yuzu_cmd/emu_window/emu_window_sdl3.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp index cff2292bb2..950e001f81 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl3.cpp @@ -37,10 +37,16 @@ EmuWindow_SDL3::EmuWindow_SDL3(InputCommon::InputSubsystem* input_subsystem_, Co SDL_SetWindowTitle(this_->render_window, title.c_str()); return 2000; }, this); + mouse_timer = SDL_AddTimer(100, [](void *userdata, SDL_TimerID, Uint32) -> Uint32 { + auto* this_ = (EmuWindow_SDL3*)userdata; + this_->input_subsystem->GetMouse()->NotifyChanged(); + return 100; + }, this); } EmuWindow_SDL3::~EmuWindow_SDL3() { SDL_RemoveTimer(titlebar_timer); + SDL_RemoveTimer(mouse_timer); system.HIDCore().UnloadInputDevices(); input_subsystem->Shutdown(); SDL_Quit(); diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl3.h b/src/yuzu_cmd/emu_window/emu_window_sdl3.h index bf63b65554..ffabaeb143 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl3.h +++ b/src/yuzu_cmd/emu_window/emu_window_sdl3.h @@ -84,6 +84,9 @@ protected: /// Periodic changer of titlebar (independent of event loop) SDL_TimerID titlebar_timer; + // Mouse resetter once it + SDL_TimerID mouse_timer; + /// Is the window still open? bool is_open = true;