mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2026-04-25 07:46:01 +03:00
[PR #3122] [MERGED] Emulate motion controls with a mouse #3241
Labels
No labels
Bloodborne
bug
contributor wanted
documentation
enhancement
frontend
good first issue
help wanted
linux
pull-request
question
release
verification progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shadPS4#3241
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/shadps4-emu/shadPS4/pull/3122
Author: @kalaposfos13
Created: 6/19/2025
Status: ✅ Merged
Merged: 6/20/2025
Merged by: @georgemoralis
Base:
main← Head:mouse-gyro📝 Commits (7)
b3dd428Rework framework to allow for more types of mouse-to-something emulation and hook up gyro to ita708e28Remove the unnecessary null check now that deltatime is handled differentlye1a40b6Fix toggle keyf4653d4Basic gyro emulation working for two out of the three dimensions32edcd4clangadd4371Added bindable key to hold for switching from looking to the sides to rolling1df9d89documentation📊 Changes
7 files changed (+88 additions, -30 deletions)
View changed files
📝
src/core/libraries/pad/pad.cpp(+12 -15)📝
src/input/input_handler.cpp(+4 -0)📝
src/input/input_handler.h(+2 -0)📝
src/input/input_mouse.cpp(+46 -9)📝
src/input/input_mouse.h(+12 -2)📝
src/qt_gui/kbm_help_dialog.h(+4 -1)📝
src/sdl_window.cpp(+8 -3)📄 Description
Adds the ability to emulate motion control inputs via a mouse. Since a gyroscope is a three-dimensional sensor, while a mouse is only two-dimensional, the full range of controls is achieved by having a (rebindable) toggle key to switch the behaviour of moving the mouse sideways between panning and rolling. While this is active, acceleration is spoofed to a constant downwards direction.
To enable it, press F6. You can also seamlessly switch between joystick and gyro emulation, if you select one while the other is active, it will cleanly switch modes, and if you press the toggle for the currently active mode, it will turn off.
The name for the keybind that switches between panning and rolling is
mouse_gyro_roll_mode.This is only the backend code and since this seems to be true for almost every PR I make, I think it will stay that way and I will pass off integrating it into the frontend to someone else.
Since it's using the same setup as joystick emulation, this is also conflicting with gyro data coming from a connected controller the same way joystick data does.
I only tested it with Gravity Rush 2, so further testing is very welcome.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.