feat: Add mouse wheel support for game input passthrough

- Implement mouse wheel event handling in SDL2 backend (emu_window_sdl2)
- Add wheel event routing from GRenderWindow to input subsystem
- Add debugging logs to trace mouse wheel events through input chain
- Support mouse wheel input for mods like Ultracam when games are running (WIP)

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-09-14 15:18:38 +10:00
parent 206d778782
commit 56d8bd7dd3
8 changed files with 34 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <thread>
@@ -235,6 +236,7 @@ void Mouse::MouseWheelChange(int x, int y) {
wheel_position.x += x;
wheel_position.y += y;
last_motion_change.z += static_cast<f32>(y);
LOG_DEBUG(Input, "Mouse wheel change: x={}, y={}, wheel_pos=({}, {})", x, y, wheel_position.x, wheel_position.y);
SetAxis(identifier, wheel_axis_x, static_cast<f32>(wheel_position.x));
SetAxis(identifier, wheel_axis_y, static_cast<f32>(wheel_position.y));
}