mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-12-16 00:29:09 +00:00
Emulate motion controls with a mouse (#3122)
* Rework framework to allow for more types of mouse-to-something emulation and hook up gyro to it * Remove the unnecessary null check now that deltatime is handled differently * Fix toggle key * Basic gyro emulation working for two out of the three dimensions * clang * Added bindable key to hold for switching from looking to the sides to rolling * documentation
This commit is contained in:
@@ -8,11 +8,21 @@
|
||||
|
||||
namespace Input {
|
||||
|
||||
void ToggleMouseEnabled();
|
||||
enum MouseMode {
|
||||
Off = 0,
|
||||
Joystick,
|
||||
Gyro,
|
||||
};
|
||||
|
||||
bool ToggleMouseModeTo(MouseMode m);
|
||||
void SetMouseToJoystick(int joystick);
|
||||
void SetMouseParams(float mouse_deadzone_offset, float mouse_speed, float mouse_speed_offset);
|
||||
void SetMouseGyroRollMode(bool mode);
|
||||
|
||||
// Polls the mouse for changes, and simulates joystick movement from it.
|
||||
void EmulateJoystick(GameController* controller, u32 interval);
|
||||
void EmulateGyro(GameController* controller, u32 interval);
|
||||
|
||||
// Polls the mouse for changes
|
||||
Uint32 MousePolling(void* param, Uint32 id, Uint32 interval);
|
||||
|
||||
} // namespace Input
|
||||
|
||||
Reference in New Issue
Block a user