mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-07-13 05:05:57 +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:
parent
be12305f65
commit
551751df3c
7 changed files with 88 additions and 30 deletions
|
@ -35,6 +35,7 @@
|
|||
#define BACK_BUTTON 0x00040000
|
||||
|
||||
#define KEY_TOGGLE 0x00200000
|
||||
#define MOUSE_GYRO_ROLL_MODE 0x00400000
|
||||
|
||||
#define SDL_UNMAPPED UINT32_MAX - 1
|
||||
|
||||
|
@ -114,6 +115,7 @@ const std::map<std::string, u32> string_to_cbutton_map = {
|
|||
{"lpaddle_low", SDL_GAMEPAD_BUTTON_LEFT_PADDLE2},
|
||||
{"rpaddle_high", SDL_GAMEPAD_BUTTON_RIGHT_PADDLE1},
|
||||
{"rpaddle_low", SDL_GAMEPAD_BUTTON_RIGHT_PADDLE2},
|
||||
{"mouse_gyro_roll_mode", MOUSE_GYRO_ROLL_MODE},
|
||||
};
|
||||
|
||||
const std::map<std::string, AxisMapping> string_to_axis_map = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue